473,414 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

SendMessage() to other App w/ a "String"

Hello,

I want to send a SendMessage(hwnd,...) to an another application containing
eighter a "String" or a PIDL... I know that the pointer lives in its own
process so the other app will have problems reading it. How was it done to
create the String / PIDL in a common memoryspace?

What I want to do is:

string szFolder = @"C:\temp\";
hWinApi.SendMessage(hwnd,hWinApi.BFFM_SETSELECTION A,new IntPtr(1),szFolder);

Where hwnd is an Handle to an other application caught by FindWindow().
// Daniel

Mar 28 '06 #1
1 1658
"Daniel Halan" <da****@spamland.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
I want to send a SendMessage(hwnd,...) to an another application
containing eighter a "String" or a PIDL... I know that the pointer lives
in its own process so the other app will have problems reading it. How was
it done to create the String / PIDL in a common memoryspace?

What I want to do is:

string szFolder = @"C:\temp\";
hWinApi.SendMessage(hwnd,hWinApi.BFFM_SETSELECTION A,new
IntPtr(1),szFolder);

Where hwnd is an Handle to an other application caught by FindWindow().


The simplest thing to do is to send a WM_COPYDATA message. If you do that
then Windows will map the buffer sent to the target process' address space
while the handler for the message is running.

Regards,
Will
Mar 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Jaime Wyant | last post by:
Will someone explain this to me? >>> "test".find("") 0 Why is the empty string found at position 0? Thanks! jw
32
by: Indrid Colt | last post by:
Thank's for your help ! Indrid
9
by: rsine | last post by:
I have developed a program that sends a command through the serial port to our business system and then reads from the buffer looking for a number. Everything worked great on my WinXP system, but...
5
by: chris_doran | last post by:
/COMMENT has been removed from the linker that comes with VS2005, and use in source code of: #pragma comment(exestr, "this is a string") gives the message: warning LNK4224: /COMMENT is no...
13
by: bwaichu | last post by:
Now, I read the faq, and it suggests using sprintf. However, I want to all ways know where the integer finishes in the string. Basically, I want to: nbr | other data But the other data all...
10
by: =?Utf-8?B?RWxlbmE=?= | last post by:
I am surprised to discover that c# automatically converts an integer to a string when concatenating with the "+" operator. I thought c# was supposed to be very strict about types. Doesn't it seem...
6
by: =?Utf-8?B?SmVmZg==?= | last post by:
I thought this would already be covered here, but my search turned up nothing. In VS2005, if I use "String" to define a new variable/class, it colors it in the Aqua color as it does other...
1
by: mato81 | last post by:
Hi all! I am a newbie to WSDL. I have a questions which has been driving me crazy... If I would have a WSDL with a types element somewhat like below, what is the point of the third last row...
21
by: Sami | last post by:
string = "" or string = string.Empty? should is the proper way? Sami
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.