Re: VirtualAllocEx alternative?
- From: "ME" <trash.trash@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 11 Aug 2008 15:37:51 -0600
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
.
- Follow-Ups:
- Re: VirtualAllocEx alternative?
- From: Paul G. Tobey [eMVP]
- Re: VirtualAllocEx alternative?
- References:
- VirtualAllocEx alternative?
- From: ME
- Re: VirtualAllocEx alternative?
- From: Chris Tacke, eMVP
- Re: VirtualAllocEx alternative?
- From: ME
- Re: VirtualAllocEx alternative?
- From: Paul G. Tobey [eMVP]
- VirtualAllocEx alternative?
- Prev by Date: Bluetooth + device
- Next by Date: Re: VirtualAllocEx alternative?
- Previous by thread: Re: VirtualAllocEx alternative?
- Next by thread: Re: VirtualAllocEx alternative?
- Index(es):
Relevant Pages
|