+.TP
+*
+Only
+.B DllImport
+entries are checked; the surrounding IL is ignored. Consequently, if a runtime
+check is performed to choose which shared library to invoke, an error will be
+reported even though the specified library is never used. Consider this code:
+.nf
+ using System.Runtime.InteropServices; // for DllImport
+ class Beep {
+ [DllImport ("kernel32.dll")]
+ private static extern int Beep (int dwFreq, int dwDuration);
+
+ [DllImport ("libcurses.so")]
+ private static extern int beep ();
+
+ public static void Beep ()
+ {
+ if (System.IO.Path.DirectorySeparatorChar == '\\\\') {
+ Beep (750, 300);
+ }
+ else {
+ beep ();
+ }
+ }
+ }
+.fi
+If
+.I mono-shlib-cop
+is run on this assembly, an error will be reported for using
+.I kernel32.dll
+, even though
+.I kernel32.dll
+will never be used on Unix platforms.
+.TP
+*