[NEWBIE] DLLImport

J

Jeff

Hey

I'm trying to call function BOOL PtInRect(const RECT *lprc, POINT pt) from
C#:

This is my C# code I have problem with:
[DLLImport("user32")]
public static extern bool PtInRect(ref Rect, Point p);

I haven't imported the user32.dll into the project, must I import the .dll
first or is it automatically done by visual studio .NET?

Jeff
 
W

Wiebe Tijsma

Hi,

You don't have to import it, this is done runtime.
This is the signature (as found on http://www.PInvoke.net):

[DllImport("user32.dll")]
static extern bool PtInRect(ref RECT lprc, POINT pt);

Best Regards,

Wiebe Tijsma
 

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