Win32 Api

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
 
J

Jochen Kalmbach

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/
 
E

Elmue

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ü
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top