Loading ...
Sorry, an error occurred while loading the content.

Re: [perlguitest] Re: Hooking

Expand Messages
  • Kevin Piantanida
    Dennis, I have successfully retrieved data from a SysListView32 control using the GetListViewContents function, and it seems to work very well. I do have a
    Message 1 of 14 , Jan 19, 2003
    • 0 Attachment
      Dennis,
      I have successfully retrieved data from a SysListView32 control using the GetListViewContents function, and it seems to work very well. I do have a question, though: The SysListView32 control I am pulling data from has a SysHeader32 control child window (similar to the right window pane of windows explorer), and the data in the SysListView32 control appears in multiple columns under the SysHeader32 control. The GetListViewContents control returns the contents of the first column, but none of the other columns. I am very happy to be able to get the data that I have gotten so far from the control, but I was just wondering if this was something that could be accomplished easily.

      Thanks,
      Kevin

      ----- Original Message -----
      From: Dennis K. Paulsen
      To: perlguitest@yahoogroups.com
      Sent: Monday, January 17, 2005 12:16 AM
      Subject: [perlguitest] Re: Hooking




      In the CVS build (sourceforge.net/projects/winguitest or
      dkpinteractive.ath.cx) of Win32::GuiTest, there exists the following
      functions to operate on a listview32 control:

      GetListViewContents - Returns a list of textual items in the
      listview32 control.
      SelListViewItem - Select an item by index
      SelListViewItemText - Select an item by name
      IsListViewItemSel - Determine if an item is selected.

      More functionality could be added in the future if needed.

      As an aside, if I can get some additional testers of this new
      functionality, we could swindle a stable release in the near future.

      Regards,
      D
      --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
      <darnitshardtofindausername@y...> wrote:
      >
      >
      > This is sort of off the subject, but does this mean we can control
      a
      > ListView32 control now?
      > I could really use that functionality. I have spent the better
      part of
      > my weekend trying to learn something about Windows API calls so I
      can
      > do some automated testing on an app that uses this control.
      >
      > Thanks
      > Andreas.
      >
      > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
      > <ctrondlpaulsden@y...> wrote:
      > >
      > >
      > > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the
      windows
      > > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that we
      can
      > > interface with various 32bit custom controls, marshall data back
      > > from these controls, etc...
      > >
      > > For example, with a ListView32 control we can't simply just
      issue a
      > > call to ListView_GetItemText() to read an item's text, because
      of
      > > the process boundary limiation, you'll normally end up getting
      an
      > > access violation because your accessing data outside of the
      > > processes address space...
      > >
      > > Regards,
      > > D
      > >
      > > --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...>
      wrote:
      > > >
      > > > Hi,
      > > > For what is API hooking used in guitest.xs?
      > > >
      > > > -Piotr





      ------------------------------------------------------------------------------
      Yahoo! Groups Links

      a.. To visit your group on the web, go to:
      http://groups.yahoo.com/group/perlguitest/

      b.. To unsubscribe from this group, send an email to:
      perlguitest-unsubscribe@yahoogroups.com

      c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      [Non-text portions of this message have been removed]
    • darnitshardtofindausername
      This is sort of off the subject, but does this mean we can control a ListView32 control now? I could really use that functionality. I have spent the better
      Message 2 of 14 , Jan 15, 2005
      • 0 Attachment
        This is sort of off the subject, but does this mean we can control a
        ListView32 control now?
        I could really use that functionality. I have spent the better part of
        my weekend trying to learn something about Windows API calls so I can
        do some automated testing on an app that uses this control.

        Thanks
        Andreas.

        --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
        <ctrondlpaulsden@y...> wrote:
        >
        >
        > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the windows
        > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that we can
        > interface with various 32bit custom controls, marshall data back
        > from these controls, etc...
        >
        > For example, with a ListView32 control we can't simply just issue a
        > call to ListView_GetItemText() to read an item's text, because of
        > the process boundary limiation, you'll normally end up getting an
        > access violation because your accessing data outside of the
        > processes address space...
        >
        > Regards,
        > D
        >
        > --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
        > >
        > > Hi,
        > > For what is API hooking used in guitest.xs?
        > >
        > > -Piotr
      • Dennis K. Paulsen
        In the CVS build (sourceforge.net/projects/winguitest or dkpinteractive.ath.cx) of Win32::GuiTest, there exists the following functions to operate on a
        Message 3 of 14 , Jan 16, 2005
        • 0 Attachment
          In the CVS build (sourceforge.net/projects/winguitest or
          dkpinteractive.ath.cx) of Win32::GuiTest, there exists the following
          functions to operate on a listview32 control:

          GetListViewContents - Returns a list of textual items in the
          listview32 control.
          SelListViewItem - Select an item by index
          SelListViewItemText - Select an item by name
          IsListViewItemSel - Determine if an item is selected.

          More functionality could be added in the future if needed.

          As an aside, if I can get some additional testers of this new
          functionality, we could swindle a stable release in the near future.

          Regards,
          D
          --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
          <darnitshardtofindausername@y...> wrote:
          >
          >
          > This is sort of off the subject, but does this mean we can control
          a
          > ListView32 control now?
          > I could really use that functionality. I have spent the better
          part of
          > my weekend trying to learn something about Windows API calls so I
          can
          > do some automated testing on an app that uses this control.
          >
          > Thanks
          > Andreas.
          >
          > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
          > <ctrondlpaulsden@y...> wrote:
          > >
          > >
          > > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the
          windows
          > > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that we
          can
          > > interface with various 32bit custom controls, marshall data back
          > > from these controls, etc...
          > >
          > > For example, with a ListView32 control we can't simply just
          issue a
          > > call to ListView_GetItemText() to read an item's text, because
          of
          > > the process boundary limiation, you'll normally end up getting
          an
          > > access violation because your accessing data outside of the
          > > processes address space...
          > >
          > > Regards,
          > > D
          > >
          > > --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...>
          wrote:
          > > >
          > > > Hi,
          > > > For what is API hooking used in guitest.xs?
          > > >
          > > > -Piotr
        • darnitshardtofindausername
          Sure,I d love to test it and report any bugs that I find. Let me know the proper procedures. However, I was unable to install the module. ppm is complaining
          Message 4 of 14 , Jan 17, 2005
          • 0 Attachment
            Sure,I'd love to test it and report any bugs that I find. Let me
            know the proper procedures. However, I was unable to install the
            module. ppm is complaining about the Win32-GuiTest.tar.gz file
            missing, which is true. It is not in the CVS distribution. It is
            present in the Win32-GuiTest-ad distribution. (I tried using the old
            tar file, but not surprisingly it did not import GetListViewContents)

            Can the module be installed without the tar file?. What am I doing
            wrong here?

            Thanks Andreas.

            --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
            <ctrondlpaulsden@y...> wrote:
            >
            >
            > In the CVS build (sourceforge.net/projects/winguitest or
            > dkpinteractive.ath.cx) of Win32::GuiTest, there exists the
            following
            > functions to operate on a listview32 control:
            >
            > GetListViewContents - Returns a list of textual items in the
            > listview32 control.
            > SelListViewItem - Select an item by index
            > SelListViewItemText - Select an item by name
            > IsListViewItemSel - Determine if an item is selected.
            >
            > More functionality could be added in the future if needed.
            >
            > As an aside, if I can get some additional testers of this new
            > functionality, we could swindle a stable release in the near
            future.
            >
            > Regards,
            > D
            > --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
            > <darnitshardtofindausername@y...> wrote:
            > >
            > >
            > > This is sort of off the subject, but does this mean we can
            control
            > a
            > > ListView32 control now?
            > > I could really use that functionality. I have spent the better
            > part of
            > > my weekend trying to learn something about Windows API calls so
            I
            > can
            > > do some automated testing on an app that uses this control.
            > >
            > > Thanks
            > > Andreas.
            > >
            > > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
            > > <ctrondlpaulsden@y...> wrote:
            > > >
            > > >
            > > > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the
            > windows
            > > > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that
            we
            > can
            > > > interface with various 32bit custom controls, marshall data
            back
            > > > from these controls, etc...
            > > >
            > > > For example, with a ListView32 control we can't simply just
            > issue a
            > > > call to ListView_GetItemText() to read an item's text, because
            > of
            > > > the process boundary limiation, you'll normally end up getting
            > an
            > > > access violation because your accessing data outside of the
            > > > processes address space...
            > > >
            > > > Regards,
            > > > D
            > > >
            > > > --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...>
            > wrote:
            > > > >
            > > > > Hi,
            > > > > For what is API hooking used in guitest.xs?
            > > > >
            > > > > -Piotr
          • darnitshardtofindausername
            I am trying to compile the module right now. But I just have to ask anyway. Would it be really hard for you to give us a precompiled version that can be
            Message 5 of 14 , Jan 17, 2005
            • 0 Attachment
              I am trying to compile the module right now. But I just have to ask
              anyway. Would it be really hard for you to give us a precompiled
              version that can be installed with ppm? Since you have your build
              environment set up already.

              Thanks again
              Andreas.

              --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
              <darnitshardtofindausername@y...> wrote:
              >
              >
              > Sure,I'd love to test it and report any bugs that I find. Let me
              > know the proper procedures. However, I was unable to install the
              > module. ppm is complaining about the Win32-GuiTest.tar.gz file
              > missing, which is true. It is not in the CVS distribution. It is
              > present in the Win32-GuiTest-ad distribution. (I tried using the
              old
              > tar file, but not surprisingly it did not import
              GetListViewContents)
              >
              > Can the module be installed without the tar file?. What am I doing
              > wrong here?
              >
              > Thanks Andreas.
              >
              > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
              > <ctrondlpaulsden@y...> wrote:
              > >
              > >
              > > In the CVS build (sourceforge.net/projects/winguitest or
              > > dkpinteractive.ath.cx) of Win32::GuiTest, there exists the
              > following
              > > functions to operate on a listview32 control:
              > >
              > > GetListViewContents - Returns a list of textual items in the
              > > listview32 control.
              > > SelListViewItem - Select an item by index
              > > SelListViewItemText - Select an item by name
              > > IsListViewItemSel - Determine if an item is selected.
              > >
              > > More functionality could be added in the future if needed.
              > >
              > > As an aside, if I can get some additional testers of this new
              > > functionality, we could swindle a stable release in the near
              > future.
              > >
              > > Regards,
              > > D
              > > --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
              > > <darnitshardtofindausername@y...> wrote:
              > > >
              > > >
              > > > This is sort of off the subject, but does this mean we can
              > control
              > > a
              > > > ListView32 control now?
              > > > I could really use that functionality. I have spent the better
              > > part of
              > > > my weekend trying to learn something about Windows API calls
              so
              > I
              > > can
              > > > do some automated testing on an app that uses this control.
              > > >
              > > > Thanks
              > > > Andreas.
              > > >
              > > > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
              > > > <ctrondlpaulsden@y...> wrote:
              > > > >
              > > > >
              > > > > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the
              > > windows
              > > > > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so
              that
              > we
              > > can
              > > > > interface with various 32bit custom controls, marshall data
              > back
              > > > > from these controls, etc...
              > > > >
              > > > > For example, with a ListView32 control we can't simply just
              > > issue a
              > > > > call to ListView_GetItemText() to read an item's text,
              because
              > > of
              > > > > the process boundary limiation, you'll normally end up
              getting
              > > an
              > > > > access violation because your accessing data outside of the
              > > > > processes address space...
              > > > >
              > > > > Regards,
              > > > > D
              > > > >
              > > > > --- In perlguitest@yahoogroups.com, "pkaluski"
              <pkaluski@p...>
              > > wrote:
              > > > > >
              > > > > > Hi,
              > > > > > For what is API hooking used in guitest.xs?
              > > > > >
              > > > > > -Piotr
            • pkaluski
              Good point. For now try this: http://www.piotrkaluski.com/tools/lguitest/introduction/win32-guitest- ppm.tar.gz. It is a packed ppm module, which contains ppd
              Message 6 of 14 , Jan 17, 2005
              • 0 Attachment
                Good point.
                For now try this:
                http://www.piotrkaluski.com/tools/lguitest/introduction/win32-guitest-
                ppm.tar.gz. It is a packed ppm module, which contains ppd and tar.gz
                file. You have to unzip it (once). Then run ppm, set it to look in
                local directory and install the module. Let me know if it does not
                work.
                I general, agree with you. We should release not only the development
                package but also ppm package for people, who want to use the module,
                not to change it.
                Source Forge gives the possibility of releasing many types of
                packages. One can release 2 packages - for developers and for users
                (ppm package). That's what I am doing in my project
                http://sourceforge.net/projects/lreport/

                -Piotr

                --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
                <darnitshardtofindausername@y...> wrote:
                >
                >
                > I am trying to compile the module right now. But I just have to ask
                > anyway. Would it be really hard for you to give us a precompiled
                > version that can be installed with ppm? Since you have your build
                > environment set up already.
                >
                > Thanks again
                > Andreas.
                >
              • darnitshardtofindausername
                Thanks Piotr, I did get my build environment set up late yesterday afternoon and I was able to compile and install the module, so that issue is resolved.
                Message 7 of 14 , Jan 18, 2005
                • 0 Attachment
                  Thanks Piotr,

                  I did get my build environment set up late yesterday afternoon and I
                  was able to compile and install the module, so that issue is
                  resolved. However, I still think it would be very beneficial to have
                  both versions available in the future for users/testers that does
                  not want to install everything that is needed for compilation.
                  Thanks again though, I really appreciate you posting an alternative.
                  Andreas.


                  --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
                  >
                  > Good point.
                  > For now try this:
                  > http://www.piotrkaluski.com/tools/lguitest/introduction/win32-
                  guitest-
                  > ppm.tar.gz. It is a packed ppm module, which contains ppd and
                  tar.gz
                  > file. You have to unzip it (once). Then run ppm, set it to look in
                  > local directory and install the module. Let me know if it does not
                  > work.
                  > I general, agree with you. We should release not only the
                  development
                  > package but also ppm package for people, who want to use the
                  module,
                  > not to change it.
                  > Source Forge gives the possibility of releasing many types of
                  > packages. One can release 2 packages - for developers and for
                  users
                  > (ppm package). That's what I am doing in my project
                  > http://sourceforge.net/projects/lreport/
                  >
                  > -Piotr
                  >
                  > --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
                  > <darnitshardtofindausername@y...> wrote:
                  > >
                  > >
                  > > I am trying to compile the module right now. But I just have to
                  ask
                  > > anyway. Would it be really hard for you to give us a precompiled
                  > > version that can be installed with ppm? Since you have your
                  build
                  > > environment set up already.
                  > >
                  > > Thanks again
                  > > Andreas.
                  > >
                • darnitshardtofindausername
                  I trying to do the same, but can t get the other columns. This would be a very useful to have access to this type of control. I am keeping my fingers crossed
                  Message 8 of 14 , Feb 7 4:04 PM
                  • 0 Attachment
                    I trying to do the same, but can't get the other columns. This would
                    be a very useful to have access to this type of control.
                    I am keeping my fingers crossed that this will be implemented.

                    Thanks
                    Andreas.

                    --- In perlguitest@yahoogroups.com, "Kevin Piantanida"
                    <kpiantanida@c...> wrote:
                    > Dennis,
                    > I have successfully retrieved data from a SysListView32
                    control using the GetListViewContents function, and it seems to work
                    very well. I do have a question, though: The SysListView32 control
                    I am pulling data from has a SysHeader32 control child window
                    (similar to the right window pane of windows explorer), and the data
                    in the SysListView32 control appears in multiple columns under the
                    SysHeader32 control. The GetListViewContents control returns the
                    contents of the first column, but none of the other columns. I am
                    very happy to be able to get the data that I have gotten so far from
                    the control, but I was just wondering if this was something that
                    could be accomplished easily.
                    >
                    > Thanks,
                    > Kevin
                    >
                    > ----- Original Message -----
                    > From: Dennis K. Paulsen
                    > To: perlguitest@yahoogroups.com
                    > Sent: Monday, January 17, 2005 12:16 AM
                    > Subject: [perlguitest] Re: Hooking
                    >
                    >
                    >
                    >
                    > In the CVS build (sourceforge.net/projects/winguitest or
                    > dkpinteractive.ath.cx) of Win32::GuiTest, there exists the
                    following
                    > functions to operate on a listview32 control:
                    >
                    > GetListViewContents - Returns a list of textual items in the
                    > listview32 control.
                    > SelListViewItem - Select an item by index
                    > SelListViewItemText - Select an item by name
                    > IsListViewItemSel - Determine if an item is selected.
                    >
                    > More functionality could be added in the future if needed.
                    >
                    > As an aside, if I can get some additional testers of this new
                    > functionality, we could swindle a stable release in the near
                    future.
                    >
                    > Regards,
                    > D
                    > --- In perlguitest@yahoogroups.com, "darnitshardtofindausername"
                    > <darnitshardtofindausername@y...> wrote:
                    > >
                    > >
                    > > This is sort of off the subject, but does this mean we can
                    control
                    > a
                    > > ListView32 control now?
                    > > I could really use that functionality. I have spent the better
                    > part of
                    > > my weekend trying to learn something about Windows API calls
                    so I
                    > can
                    > > do some automated testing on an app that uses this control.
                    > >
                    > > Thanks
                    > > Andreas.
                    > >
                    > > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
                    > > <ctrondlpaulsden@y...> wrote:
                    > > >
                    > > >
                    > > > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the
                    > windows
                    > > > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so
                    that we
                    > can
                    > > > interface with various 32bit custom controls, marshall data
                    back
                    > > > from these controls, etc...
                    > > >
                    > > > For example, with a ListView32 control we can't simply just
                    > issue a
                    > > > call to ListView_GetItemText() to read an item's text,
                    because
                    > of
                    > > > the process boundary limiation, you'll normally end up
                    getting
                    > an
                    > > > access violation because your accessing data outside of the
                    > > > processes address space...
                    > > >
                    > > > Regards,
                    > > > D
                    > > >
                    > > > --- In perlguitest@yahoogroups.com, "pkaluski"
                    <pkaluski@p...>
                    > wrote:
                    > > > >
                    > > > > Hi,
                    > > > > For what is API hooking used in guitest.xs?
                    > > > >
                    > > > > -Piotr
                    >
                    >
                    >
                    >
                    >
                    > -------------------------------------------------------------------
                    -----------
                    > Yahoo! Groups Links
                    >
                    > a.. To visit your group on the web, go to:
                    > http://groups.yahoo.com/group/perlguitest/
                    >
                    > b.. To unsubscribe from this group, send an email to:
                    > perlguitest-unsubscribe@yahoogroups.com
                    >
                    > c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms
                    of Service.
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                  • bestoneforall smart
                    Hi, This is manasa ,,i am new to perl testing,i know well about perl,i want some details on perl testing that how it can used for widows based
                    Message 9 of 14 , Feb 10 1:16 AM
                    • 0 Attachment
                      Hi,
                      This is manasa ,,i am new to perl testing,i know well
                      about perl,i want some details on perl testing that
                      how it can used for widows based applications.....plz
                      help me



                      __________________________________
                      Do you Yahoo!?
                      All your favorites on one personal page � Try My Yahoo!
                      http://my.yahoo.com
                    • pkaluski
                      ... can ... Dennis, If I understand you correctly, hooking solution (in Win32::GuiTest) works as follows: For each control related operation (like getting
                      Message 10 of 14 , Feb 14 1:36 AM
                      • 0 Attachment
                        --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
                        <ctrondlpaulsden@y...> wrote:
                        >
                        >
                        > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the windows
                        > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that we
                        can
                        > interface with various 32bit custom controls, marshall data back
                        > from these controls, etc...
                        >
                        > For example, with a ListView32 control we can't simply just issue a
                        > call to ListView_GetItemText() to read an item's text, because of
                        > the process boundary limiation, you'll normally end up getting an
                        > access violation because your accessing data outside of the
                        > processes address space...
                        >
                        > Regards,
                        > D
                        >

                        Dennis,
                        If I understand you correctly, hooking solution (in Win32::GuiTest)
                        works as follows:
                        For each control related operation (like getting ListView32 contents)
                        a hook is set, so the actual list processing is run in address space
                        of the process which hosts this control.
                        This solution is correct (it is used by Richter in his book) but I
                        think it brings some maintainability problems. Expanding
                        Win32::GuiTest for handling new controls would reguire changes in .xs
                        file and recompilation.
                        I believe I have found more flexible solution. Have a look:
                        http://www.mathimagics.com/TechNote001.html, "Cross-process buffers"
                        section. The full example with the code can be found here:
                        http://www.visualbasicforum.com/showthread.php?t=38276

                        In short, instead of hooking, the solution uses VirtualAllocEx
                        function. This function allocates memory is other process's address
                        space. So what you do is this: you allocate memory in address space
                        of a process, which hosts a control. You get pointer to this memory.
                        Then, you call Send/PostMessage passing this pointer. Control will
                        respond writting to proper address space.
                        If we manage to create a consistent interface to this functionality,
                        we will deliver a mechanism to handle new controls without writing
                        any new C code.

                        -Piotr

                        PS: What is WM_LV_GETTEXT, WM_LV_SELBYTEXT and so on in HookProc?
                        Both google and MSDN did not return anything.
                      • Maricel Ciupitu
                        Hi, Before 1.49 I have to read some data from ListView32 control. So I made a dll which uses VirtualAllocEx to read data from the control. Then from perl with
                        Message 11 of 14 , Feb 14 2:48 AM
                        • 0 Attachment
                          Hi,

                          Before 1.49 I have to read some data from ListView32 control. So I made
                          a dll which uses VirtualAllocEx to read data from the control. Then from
                          perl with Win32api call this dll. I attach the source code for dll if
                          need it.

                          -----Original Message-----
                          From: pkaluski [mailto:pkaluski@...]
                          Sent: Monday, February 14, 2005 11:37 AM
                          To: perlguitest@yahoogroups.com
                          Subject: [perlguitest] Re: Hooking




                          --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
                          <ctrondlpaulsden@y...> wrote:
                          >
                          >
                          > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the windows
                          > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that we
                          can
                          > interface with various 32bit custom controls, marshall data back from
                          > these controls, etc...
                          >
                          > For example, with a ListView32 control we can't simply just issue a
                          > call to ListView_GetItemText() to read an item's text, because of the
                          > process boundary limiation, you'll normally end up getting an access
                          > violation because your accessing data outside of the processes address

                          > space...
                          >
                          > Regards,
                          > D
                          >

                          Dennis,
                          If I understand you correctly, hooking solution (in Win32::GuiTest)
                          works as follows:
                          For each control related operation (like getting ListView32 contents)
                          a hook is set, so the actual list processing is run in address space
                          of the process which hosts this control.
                          This solution is correct (it is used by Richter in his book) but I
                          think it brings some maintainability problems. Expanding
                          Win32::GuiTest for handling new controls would reguire changes in .xs
                          file and recompilation.
                          I believe I have found more flexible solution. Have a look:
                          http://www.mathimagics.com/TechNote001.html, "Cross-process buffers"
                          section. The full example with the code can be found here:
                          http://www.visualbasicforum.com/showthread.php?t=38276

                          In short, instead of hooking, the solution uses VirtualAllocEx
                          function. This function allocates memory is other process's address
                          space. So what you do is this: you allocate memory in address space
                          of a process, which hosts a control. You get pointer to this memory.
                          Then, you call Send/PostMessage passing this pointer. Control will
                          respond writting to proper address space.
                          If we manage to create a consistent interface to this functionality,
                          we will deliver a mechanism to handle new controls without writing
                          any new C code.

                          -Piotr

                          PS: What is WM_LV_GETTEXT, WM_LV_SELBYTEXT and so on in HookProc?
                          Both google and MSDN did not return anything.







                          Yahoo! Groups Links









                          Prezentul mesaj si orice fisier atasat constituie informatie
                          confidentiala si este proprietatea exclusiva a MobiFon S.A.. Mesajul se
                          adreseaza numai persoanei fizice sau juridice mentionata ca destinatara,
                          precum si persoanelor autorizate sa-l primeasca. In cazul in care nu
                          sunteti destinatarul vizat sau persoana autorizata sa primiti acest
                          mesaj , va aducem la cunostinta ca dezvaluirea, copierea, distribuirea
                          sau initierea unor actiuni pe baza prezentei informatii sunt strict
                          interzise si atrag raspunderea dvs. civila si penala. Daca ati primit
                          acest mesaj dintr-o eroare, va rugam sa ne anuntati imediat si sa-l
                          stergeti apoi din sistemul dvs.
                          Nu putem garanta ca transmisia acestui mesaj este securizata sau fara
                          erori.


                          This message and any files or documents attached are classified as
                          MobiFon SA confidential and Propietary Information. It is intended only
                          for the individual or entity named and others authorized to receive it.
                          If you are not the intended recipient or authorized to receive it, you
                          are hereby notified that any disclosure, copying, distribution or taking
                          any action in reliance on the contents of this information is strictly
                          prohibited and may be unlawful. If you have received this communication
                          in error, please notify us immediately then delete it from your
                          system.Please also note that transmission cannot be guaranteed to be
                          secure or error-free.


                          [Non-text portions of this message have been removed]
                        • pkaluski
                          Hi, Can you place the zip file with the source code in the files section? -Piotr ... made ... from ... if ... from ... a ... the ... access ... address ...
                          Message 12 of 14 , Feb 14 3:55 AM
                          • 0 Attachment
                            Hi,
                            Can you place the zip file with the source code in the files section?

                            -Piotr

                            --- In perlguitest@yahoogroups.com, "Maricel Ciupitu"
                            <maricel.ciupitu@c...> wrote:
                            >
                            >
                            > Hi,
                            >
                            > Before 1.49 I have to read some data from ListView32 control. So I
                            made
                            > a dll which uses VirtualAllocEx to read data from the control. Then
                            from
                            > perl with Win32api call this dll. I attach the source code for dll
                            if
                            > need it.
                            >
                            > -----Original Message-----
                            > From: pkaluski [mailto:pkaluski@p...]
                            > Sent: Monday, February 14, 2005 11:37 AM
                            > To: perlguitest@yahoogroups.com
                            > Subject: [perlguitest] Re: Hooking
                            >
                            >
                            >
                            >
                            > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
                            > <ctrondlpaulsden@y...> wrote:
                            > >
                            > >
                            > > In the latest CVS builds of Win32::GuiTest/GuiTest.xs, the windows
                            > > hook (WH_CALLWNDPROC) is *part* of the puzzle we use, so that we
                            > can
                            > > interface with various 32bit custom controls, marshall data back
                            from
                            > > these controls, etc...
                            > >
                            > > For example, with a ListView32 control we can't simply just issue
                            a
                            > > call to ListView_GetItemText() to read an item's text, because of
                            the
                            > > process boundary limiation, you'll normally end up getting an
                            access
                            > > violation because your accessing data outside of the processes
                            address
                            >
                            > > space...
                            > >
                            > > Regards,
                            > > D
                            > >
                            >
                            > Dennis,
                            > If I understand you correctly, hooking solution (in Win32::GuiTest)
                            > works as follows:
                            > For each control related operation (like getting ListView32
                            contents)
                            > a hook is set, so the actual list processing is run in address
                            space
                            > of the process which hosts this control.
                            > This solution is correct (it is used by Richter in his book) but I
                            > think it brings some maintainability problems. Expanding
                            > Win32::GuiTest for handling new controls would reguire changes
                            in .xs
                            > file and recompilation.
                            > I believe I have found more flexible solution. Have a look:
                            > http://www.mathimagics.com/TechNote001.html, "Cross-process
                            buffers"
                            > section. The full example with the code can be found here:
                            > http://www.visualbasicforum.com/showthread.php?t=38276
                            >
                            > In short, instead of hooking, the solution uses VirtualAllocEx
                            > function. This function allocates memory is other process's address
                            > space. So what you do is this: you allocate memory in address space
                            > of a process, which hosts a control. You get pointer to this
                            memory.
                            > Then, you call Send/PostMessage passing this pointer. Control will
                            > respond writting to proper address space.
                            > If we manage to create a consistent interface to this
                            functionality,
                            > we will deliver a mechanism to handle new controls without writing
                            > any new C code.
                            >
                            > -Piotr
                            >
                            > PS: What is WM_LV_GETTEXT, WM_LV_SELBYTEXT and so on in HookProc?
                            > Both google and MSDN did not return anything.
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            > Yahoo! Groups Links
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            > Prezentul mesaj si orice fisier atasat constituie informatie
                            > confidentiala si este proprietatea exclusiva a MobiFon S.A..
                            Mesajul se
                            > adreseaza numai persoanei fizice sau juridice mentionata ca
                            destinatara,
                            > precum si persoanelor autorizate sa-l primeasca. In cazul in care nu
                            > sunteti destinatarul vizat sau persoana autorizata sa primiti acest
                            > mesaj , va aducem la cunostinta ca dezvaluirea, copierea,
                            distribuirea
                            > sau initierea unor actiuni pe baza prezentei informatii sunt strict
                            > interzise si atrag raspunderea dvs. civila si penala. Daca ati
                            primit
                            > acest mesaj dintr-o eroare, va rugam sa ne anuntati imediat si sa-l
                            > stergeti apoi din sistemul dvs.
                            > Nu putem garanta ca transmisia acestui mesaj este securizata sau
                            fara
                            > erori.
                            >
                            >
                            > This message and any files or documents attached are classified as
                            > MobiFon SA confidential and Propietary Information. It is intended
                            only
                            > for the individual or entity named and others authorized to receive
                            it.
                            > If you are not the intended recipient or authorized to receive it,
                            you
                            > are hereby notified that any disclosure, copying, distribution or
                            taking
                            > any action in reliance on the contents of this information is
                            strictly
                            > prohibited and may be unlawful. If you have received this
                            communication
                            > in error, please notify us immediately then delete it from your
                            > system.Please also note that transmission cannot be guaranteed to be
                            > secure or error-free.
                            >
                            >
                            > [Non-text portions of this message have been removed]
                          Your message has been successfully submitted and would be delivered to recipients shortly.