summaryrefslogtreecommitdiff
path: root/unittests/autotestscripts/check_debug_dlls.pl
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/autotestscripts/check_debug_dlls.pl')
-rw-r--r--unittests/autotestscripts/check_debug_dlls.pl25
1 files changed, 25 insertions, 0 deletions
diff --git a/unittests/autotestscripts/check_debug_dlls.pl b/unittests/autotestscripts/check_debug_dlls.pl
new file mode 100644
index 0000000..7f1e16c
--- /dev/null
+++ b/unittests/autotestscripts/check_debug_dlls.pl
@@ -0,0 +1,25 @@
+#!perl
+
+use File::Find;
+use Win32::API;
+
+find(\&ProcessFile, "../../../game/bin/" );
+
+sub ProcessFile
+ {
+ return if (/360/);
+ return unless( /\.dll$/i );
+ my $LoadLibrary = Win32::API->new( "kernel32", "LoadLibrary","P","L" );
+ my $GetProcAddress = Win32::API->new( "kernel32", "GetProcAddress","LP","L" );
+ my $FreeLibrary = Win32::API->new( "kernel32", "FreeLibrary", "P", "V" );
+ my $handle=$LoadLibrary->Call($_);
+ if ( $handle )
+ {
+ my $proc = $GetProcAddress->Call($handle, "BuiltDebug\0");
+ if ( $proc )
+ {
+ print "Error $_ is built debug\n";
+ }
+ $FreeLibrary->Call( $handle );
+ }
+ }