Click here to Skip to main content
15,914,016 members
Home / Discussions / C#
   

C#

 
GeneralRe: Optional Parameter in C# Pin
arechno18-Jul-05 19:27
arechno18-Jul-05 19:27 
GeneralRe: Optional Parameter in C# Pin
Christian Graus18-Jul-05 19:29
protectorChristian Graus18-Jul-05 19:29 
GeneralRe: Optional Parameter in C# Pin
DavidNohejl19-Jul-05 3:08
DavidNohejl19-Jul-05 3:08 
GeneralRe: Optional Parameter in C# Pin
Dave Doknjas19-Jul-05 16:45
Dave Doknjas19-Jul-05 16:45 
GeneralRe: Optional Parameter in C# Pin
Christian Graus19-Jul-05 16:52
protectorChristian Graus19-Jul-05 16:52 
GeneralMy XmlFile looses its tree hierarchy after saving it Pin
rudy.net18-Jul-05 15:01
rudy.net18-Jul-05 15:01 
GeneralGetLParam function Pin
manhuber18-Jul-05 14:56
manhuber18-Jul-05 14:56 
GeneralRe: GetLParam function Pin
Luis Alonso Ramos18-Jul-05 15:30
Luis Alonso Ramos18-Jul-05 15:30 
I don't know if it's the case here (it's been years since I programmed in Win32) but some messages parameters are not marshalled across process boundaries.

When you use WM_GETTEXT to get another process's window caption, Windows sees that you are passing a pointer, and copies the memory pointed to by the address in lParam to the other process, sends the message, and then brings the memory back to your process.

But if it's a app-specific message (above WM_USER) Windows has no way of knowing that the lParam is a pointer to some memory located somewhere else in your process address space, instead of a scalar value.

In this case, you would need to use ReadProcessMemory/WriteProcessMemory (are they called like that?).

You could also try the WM_COPYDATA message. As far as I understand, this message was designed specifically for this kind of uses (interprocess communication) and the data gets marshalled automatically.

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

GeneralASP('Cache-Control') Pin
felopater18-Jul-05 14:04
felopater18-Jul-05 14:04 
GeneralStatic Objects - Stupid Question Pin
Tristan Rhodes18-Jul-05 13:53
Tristan Rhodes18-Jul-05 13:53 
GeneralRe: Static Objects - Stupid Question Pin
leppie19-Jul-05 0:27
leppie19-Jul-05 0:27 
GeneralListView and VScrollBar. Pin
93Current18-Jul-05 13:36
93Current18-Jul-05 13:36 
GeneralRe: ListView and VScrollBar. Pin
Christian Graus18-Jul-05 13:45
protectorChristian Graus18-Jul-05 13:45 
GeneralRe: ListView and VScrollBar. Pin
Jano Petras18-Jul-05 14:36
Jano Petras18-Jul-05 14:36 
GeneralSolution is very simple! Pin
93Current19-Jul-05 9:14
93Current19-Jul-05 9:14 
QuestionThis program will self destruct in 10 sec....??? Pin
WetRivrRat18-Jul-05 12:22
WetRivrRat18-Jul-05 12:22 
AnswerRe: This program will self destruct in 10 sec....??? Pin
Christian Graus18-Jul-05 13:07
protectorChristian Graus18-Jul-05 13:07 
AnswerRe: This program will self destruct in 10 sec....??? Pin
Luis Alonso Ramos18-Jul-05 15:34
Luis Alonso Ramos18-Jul-05 15:34 
GeneralSNMP Pin
palwhatsup18-Jul-05 12:13
palwhatsup18-Jul-05 12:13 
GeneralRe: SNMP Pin
leppie19-Jul-05 0:32
leppie19-Jul-05 0:32 
QuestiondeSerialization is slow why? Pin
erdsah8818-Jul-05 11:48
erdsah8818-Jul-05 11:48 
AnswerRe: deSerialization is slow why? Pin
Robert Rohde18-Jul-05 18:42
Robert Rohde18-Jul-05 18:42 
AnswerRe: deSerialization is slow why? Pin
leppie19-Jul-05 0:40
leppie19-Jul-05 0:40 
GeneralTwain return bitmap Pin
baskota18-Jul-05 9:53
baskota18-Jul-05 9:53 
GeneralRe: Twain return bitmap Pin
Judah Gabriel Himango18-Jul-05 10:38
sponsorJudah Gabriel Himango18-Jul-05 10:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.