 <p>There is no public <code>NativeMethods</code> class in .NET. It is considered good practice to put calls in a <code>NativeMethods</code> class, so this is probably what you are seeing.</p> <p>You need to use P/Invoke to call Win32 API functions. See <a href="http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx" rel="nofollow">this tutorial</a>.</p>