Re: VirtualAllocEx alternative?

Tech-Archive recommends: Fix windows errors by optimizing your registry



I totally agree that this is a POOR design, however with *absolutely no
control* over the third party app, I see no other approach that would work
here. The good news is I don't need to "write" back to the controls, just
read them (their contents mostly). That said, my question was not if I
should do it this way, but rather, is it even possible? From the sounds of
things it just isn't in Windows Mobile. Is this a fair assessment?

Thanks,

Matt


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:Orc%23qi8%23IHA.2056@xxxxxxxxxxxxxxxxxxxxxxx
You might be able to send a message to the program with the listview and
enumerate the items in the list, but this architecture is POOR, at best.
Going over and grabbing stuff from other applications is something that
should and, generally, is blocked by the OS for obvious reasons. Have the
other program write the data to a disk file or, as Chris said, rewrite it
to provide a documented and supportable method of accessing the data from
another process.

You're absolutely certain that there is not some better way to accomplish
this already in place? Think outside the bounds of how you've done it
before.

Paul T.

"ME" <trash.trash@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:buWdnbbqX5JtXQHVnZ2dnUVZ_hWdnZ2d@xxxxxxxxxxxxxx
MessageWindow looks interesting but would be the best way to accomplish
reading the List Items from a ListView control that is not in my process?
Basically I have an application that is displaying a ListView (for which
I have can not change) and I need to write a background application that
can retrieve the list items from a ListView it is using. *Similar* to
this idea (though this is for the Full Framework):
http://dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05.aspx

So if I used MessageWindow to send the LVM_GETITEM message could I access
the LV_ITEM data by listening to the WindProc? I am sorry if I sound
green on this (I am).

Thanks,

Matt

"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in message
news:uTJTFzY%23IHA.4196@xxxxxxxxxxxxxxxxxxxxxxx
Even in CE it's a kernel call, so for CE 6.0 and later an app can't call
it anyway. That said, you certainly wouldn't want to do this anyway (in
fact I seriously doubt it's a good idea on the desktop either). If you
need to do IPC under CE, there are really 3 reasonable ways to do so:

1. Via a MessageWindow and a WM_COPY message (just like the desktop)
2. A memory mapped file (just like the desktop)
3. A point to point message queue (CE specific)

#2 [1] and #3 [2] have managed object model wrappers around them in the
Smart Device Framework.

[1]
http://opennetcf.com/library/sdf/html/efc7db91-9586-acbb-212b-e28d298c49e8.htm
[2]
http://opennetcf.com/library/sdf/html/ab10b803-66c9-fcb5-3772-e0bad65b6d86.htm
[3] www.smartdeviceframework.com


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"ME" <trash.trash@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4e6dnYNYhv2bBgHVnZ2dnUVZ_uydnZ2d@xxxxxxxxxxxxxx
I am writing a app for Windows Mobile 6 (and maybe mobile 5) and I need
to send a message to another process' control (listview for example) and
then read a struct/object back from that control. In the full framework
I would use P/Invoke to call VirtualAllocEx and write my object into a
buffer inside the second process (among other methods). Unfortunately
VirtualAllocEx is not supported on Windows Mobile 6 (it is on Windows CE
6, but not Mobile) according to the documentation:
http://msdn.microsoft.com/en-us/library/aa909179.aspx .

Are there alternatives to VirtualAllocEx that one can implement, even
if it is a bit more work? If so does anyone have any examples they can
share?

Thanks,

Matt









.



Relevant Pages

  • RE: listview vertical scrollbar width
    ... ListView control encapsulates Windows build-in List-View to leverage its ... Windows has two kinds of scroll bars. ... You may use Spy++ to view ListView control structure and its windows style ... considered the non-client area of ListView, so this WS_VSCROLL scrollbar is ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: ListView vs CheckListBox
    ... The application UI has a List View control and a Text Box and a Button. ... list view displays a list of files with checkboxes besides each file name. ... ListView.CheckedListViewItemCollection checkedItems = ... > is displayed with in my ListView, ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Autosizing Listview Columns
    ... > width of the columns after populating listview with items. ... The native listview control was design in such a way that, ... > PInvoke correctly resizes the columns, the other 3 regions all don't work ... > | private static extern int GetFocus(); ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Listviw SHOWSELALWAYS
    ... The ListView control has a HideSelection property which defaults ... > LVS_SHOWSELALWAYS is not an extended style, ... > Private Sub Form_Click ...
    (microsoft.public.vb.controls)
  • Re: Listviw SHOWSELALWAYS
    ... The ListView control has a HideSelection property which defaults ... LVS_SHOWSELALWAYS is not an extended style, ... Dim lStyles As Long ...
    (microsoft.public.vb.controls)