DllImport could not be found ?

  • Thread starter Thread starter Boki
  • Start date Start date
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.
 
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
 
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.
 
Back
Top