DllImport could not be found ?

B

Boki

Hi All,

I need to use this line ( copy from somewhere to create mouse click
event )

[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention =
CallingConvention.StdCall)]

However, I can't pass complier, the error message is:

=>
The type oro namespace name 'DllImport' could not be found ( are you
missing a using directive or an assembly reference ? )

Best regards,
Boki.
 
K

KWienhold

Hi All,

I need to use this line ( copy from somewhere to create mouse click
event )

[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention =
CallingConvention.StdCall)]

However, I can't pass complier, the error message is:

=>
The type oro namespace name 'DllImport' could not be found ( are you
missing a using directive or an assembly reference ? )

Best regards,
Boki.

Try adding "using System.Runtime.InteropServices;" to your class,
that's the namespace the DllImportAttribute resides in.

hth,
Kevin Wienhold
 
B

Boki

I need to use this line ( copy from somewhere to create mouse click
event )
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention =
CallingConvention.StdCall)]
However, I can't pass complier, the error message is:
=>
The type oro namespace name 'DllImport' could not be found ( are you
missing a using directive or an assembly reference ? )
Best regards,
Boki.

Try adding "using System.Runtime.InteropServices;" to your class,
that's the namespace the DllImportAttribute resides in.

hth,
Kevin Wienhold

It works, thanks a lot! :)

Best regards,
Boki.
 

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