Win32 Api

  • Thread starter Thread starter bayX
  • Start date Start date
B

bayX

I want to call Win32 Api from C# ? How do i make it? I have seen
[DllImport("User32.DLL")]
public static extern int SendMessage(
IntPtr hWnd,
uint Msg,
IntPtr wParam,
IntPtr lParam
);


and i could call it
SendMessage(window.Handle, WM_LBUTTONDOWN, 0, 0);

how do i catch it from c# kod ?

Please help me
 
bayX said:
I want to call Win32 Api from C# ? How do i make it? I have seen

For calling win32-api you can use www.pinvoke.net

SendMessage:
http://www.pinvoke.net/default.aspx/user32.SendMessage

[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, UIntPtr wParam,
IntPtr lParam);

how do i catch it from c# kod ?

Click-Event !?
or PreProcessMesage...

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
 
Hello

Go to
http://search.microsoft.com

and search for
101 C# Code Samples

Download the samples (6 MB)
They are REALLY helpful.

These is one example that demonstrates how to list all running processes using the old API.

Elmü
 
Back
Top