DLLImport problems

i am trying to include the following P/Invoke function in a class:
[DllImport("coredll.dll")]
private static extern bool TerminateProcess(IntPtr hProcess, uint ExitCode);

this is based on an MSDN article found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/ProcessManager.asp

the problem is when i try to compile, i get the error "The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?"

the project is a Pocket PC 2003 project.

any ideas how to successfully get this going?

[865 byte] By [farseer] at [2008-2-23]
# 1
using System.Runtime.InteropServices;

Stick it at the top of your code file.

Cheers
Daniel

DanielMoth at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 2
Daniel Moth wrote:
using System.Runtime.InteropServices;

Stick it at the top of your code file.

Cheers
Daniel

thanks much, i eventually figured it out by comparing to the sample from msdn. also someone later responed to a goggle post advising the same.

farseer at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...