声明一下即可[DllImport("kernel32.dll")]
protected static extern uint GetLastError();

解决方案 »

  1.   

    http://www.digitalearth.net.cn/GISRelatedITIssues/CSharp/CCapture.htm
      

  2.   

    还有一定要在开头声明using System.Runtime.InteropServices ;
      

  3.   

    请问什么地方有关于介绍C# API的资料的网站。
      

  4.   

    像上面一样,声明一下就可以调用了~
    http://expert.csdn.net/Expert/topic/2065/2065226.xml?temp=.182873
      

  5.   

    http://www.yesky.com/SoftChannel/72342380468109312/20020719/1621165.shtmlhttp://www.yesky.com/SoftChannel/72342380468109312/20030522/1702593.shtml
      

  6.   

    public class Win32 { 
    [DllImport("user32.dll", EntryPoint="MessageBox")] 
    public static extern int MsgBox(int hWnd, String text, String caption, uint type); 

      

  7.   

    HWND SetCapture( HWND hWnd );
    我现在要调用这个API函数,应该怎么声明该函数。声明应该写在什么地方。
      

  8.   

    看看:
    <Root>\SDK\v1.1\Samples\Technologies\Interop\PlatformInvoke