Autor Beitrag
snowy1980
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Di 22.12.09 15:11 
Hallo,

Wie kann ich an eine WindowsMessage die Daten mit dran hängen?

Ich dachte über LParam:

ausblenden C#-Quelltext
1:
SendMessage(p.MainWindowHandle, WM_COPYDATA, IntPtr.Zero, (IntPtr) MyRec);					


Da kommt ein Konvertierungsfehler. MyRec ist eine befüllte Struktur.

VG
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Di 22.12.09 20:37 
Die Chancen stehen nicht schlecht, dass irgendjemand das schon einmal vor dir versucht hat, warum nicht dort abschreiben ;) ...?
www.codeproject.com/...essCommunicator.aspx

Nach Marshal.AllocX kannst du mit Marshal.StructureToPtr die Daten reinkopieren.

_________________
>λ=
snowy1980 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mi 23.12.09 09:58 
Danke!

codeproject ist ja ne richtig gute Fundgrube.Kante ich vorher nicht :-)
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mi 23.12.09 11:19 
Google kennt sie alle ;)