osdir.com
mailing list archive

Subject: Re: Callback function calls across process? - msg#00015

List: windows.ce.devel

Date: Prev Next Index Thread: Prev Next Index
Another alternative is to use SendMessage with WM_COPYDATA. The wParam contains
the HWND of the window passing the data, and the LPARAM is a pointer to a
COPYDATASTRUCT. In the other process, write a WM_COPYDATA handler to fetch the
data and perform the callback functions.

jcc


----- Original Message ----
From: Paul Yao <paul@xxxxxxxxxxx>
To: windowsce-dev@xxxxxxxxxxxxxxx
Sent: Monday, November 6, 2006 9:20:47 AM
Subject: RE: [windowsce-dev] Callback function calls across process?

The ::SendMessage is guaranteed to work across process boundaries.

I wonder if you are having problems because of the parameters that you
are passing. I am going to make a guess here -- that you are including
one (or more) pointers in your SendMessage call. If this is true, then
it is the pointer -- and not the function call -- that is the problem.

To fix this problem, you can put your pointers into a shared memory
area. To allocate memory in a shared memory area, you need to call a
combination of several functions: (1) CreateFileMapping, and (2)
MapViewOfFile. Once you have allocated this shared memory area, copy
your parameters to this memory. Then use a pointer to this memory to
perform your inter-process SendMessage.

I made a few guesses here, so perhaps this will help or perhaps not. One
thing is clear, though: if you are using SendMessage, that function is
guaranteed to work across process boundaries.

Good luck!

Best,
Paul

-----Original Message-----
From: windowsce-dev@ yahoogroups. com
[mailto:windowsce-dev@ yahoogroups. com] On Behalf Of Jain, Vatsalya
Sent: Sunday, November 05, 2006 9:20 PM

Hi all.

I need some advice.

My current requirement is to invoke some functions using callback
mechanism, and the functions to be called are present in a dll while the
calling code is in an exe. ( ire I need to make an IPC call for the
same)

I have been able to figure out callback could be used in the same
process using ::SendMessage( hwnd,...) call , but this API wont work
for across process calls.

Can anyone suggest how to go about the Inter process calls ?

Thanks in Advance,
Regards,
Vatsalya






[Non-text portions of this message have been removed]



Mailing list addresses:
Post message: windowsce-dev@xxxxxxxxxxxxxxx
Unsubscribe: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx
List owner: windowsce-dev-owner@xxxxxxxxxxxxxxx

Website: http://groups.yahoo.com/group/windowsce-dev
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/windowsce-dev/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/windowsce-dev/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:windowsce-dev-digest@xxxxxxxxxxxxxxx
mailto:windowsce-dev-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/





Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

RE: Callback function calls across process?

The ::SendMessage is guaranteed to work across process boundaries. I wonder if you are having problems because of the parameters that you are passing. I am going to make a guess here -- that you are including one (or more) pointers in your SendMessage call. If this is true, then it is the pointer -- and not the function call -- that is the problem. To fix this problem, you can put your pointers into a shared memory area. To allocate memory in a shared memory area, you need to call a combination of several functions: (1) CreateFileMapping, and (2) MapViewOfFile. Once you have allocated this shared memory area, copy your parameters to this memory. Then use a pointer to this memory to perform your inter-process SendMessage. I made a few guesses here, so perhaps this will help or perhaps not. One thing is clear, though: if you are using SendMessage, that function is guaranteed to work across process boundaries. Good luck! Best, Paul -----Original Message----- From: windowsce-dev@xxxxxxxxxxxxxxx [mailto:windowsce-dev@xxxxxxxxxxxxxxx] On Behalf Of Jain, Vatsalya Sent: Sunday, November 05, 2006 9:20 PM Hi all. I need some advice. My current requirement is to invoke some functions using callback mechanism, and the functions to be called are present in a dll while the calling code is in an exe. ( ire I need to make an IPC call for the same) I have been able to figure out callback could be used in the same process using ::SendMessage( hwnd,...) call , but this API wont work for across process calls. Can anyone suggest how to go about the Inter process calls ? Thanks in Advance, Regards, Vatsalya Mailing list addresses: Post message: windowsce-dev@xxxxxxxxxxxxxxx Unsubscribe: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx List owner: windowsce-dev-owner@xxxxxxxxxxxxxxx Website: http://groups.yahoo.com/group/windowsce-dev Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/windowsce-dev/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/windowsce-dev/join (Yahoo! ID required) <*> To change settings via email: mailto:windowsce-dev-digest@xxxxxxxxxxxxxxx mailto:windowsce-dev-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

Next Message by Date: click to view message preview

Networking Tip!!!Using More Than One Modem at a Time!!!

Networking Tip!!!Using More Than One Modem at a Time!!! For detailed tips http://www.studyandjobs.com/network_tip.html or http://www.studyandjobs.com/IT_study.htm Regards --------------------------------- We have the perfect Group for you. Check out the handy changes to Yahoo! Groups. [Non-text portions of this message have been removed] Mailing list addresses: Post message: windowsce-dev@xxxxxxxxxxxxxxx Unsubscribe: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx List owner: windowsce-dev-owner@xxxxxxxxxxxxxxx Website: http://groups.yahoo.com/group/windowsce-dev Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/windowsce-dev/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/windowsce-dev/join (Yahoo! ID required) <*> To change settings via email: mailto:windowsce-dev-digest@xxxxxxxxxxxxxxx mailto:windowsce-dev-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

Previous Message by Thread: click to view message preview

Windows Mobile 5 and MTU size

Hi Everyone We have a customer that is experiencing a problem when connecting over GPRS through a firewall to their network, from WM5 HTC devices (Voda 1605). They have tracked it down to some of the equipment changing the MTU size of the packets and were wanting to set the MTU size from the device to see if this improves things. However we can't find where this setting is. I have searched the registry for MTU and found nothing. Do any of you know where I can change this setting? Thanks in advance Matt [Non-text portions of this message have been removed] Mailing list addresses: Post message: windowsce-dev@xxxxxxxxxxxxxxx Unsubscribe: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx List owner: windowsce-dev-owner@xxxxxxxxxxxxxxx Website: http://groups.yahoo.com/group/windowsce-dev Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/windowsce-dev/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/windowsce-dev/join (Yahoo! ID required) <*> To change settings via email: mailto:windowsce-dev-digest@xxxxxxxxxxxxxxx mailto:windowsce-dev-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

Next Message by Thread: click to view message preview

RE: Callback function calls across process?

Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by