Arp*_*wal 4 c# unmanagedresources
我正在使用一些非托管代码,如 -
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);
//Creating a function that uses the API function...
public static bool IsConnectedToInternet() {
int Desc;
return InternetGetConnectedState(out Desc, 0);
}
Run Code Online (Sandbox Code Playgroud)
关于在调用Dispose时如何处理/清理这个extern静态对象的任何建议?