例如,在旧的.NETFramework2.0源代码(Windows窗体、VisualStudio2005-Whidbey)中,GetClientRect函数是使用HandleRef定义的:[DllImport(ExternDll.User32,ExactSpelling=true,CharSet=CharSet.Auto)]publicstaticexternboolGetClientRect(HandleRefhWnd,[In,Out]refNativeMethods.RECTrect);在新的WindowsAPI代码包(来自Microsoft,2009/2010)中,使用IntPt