diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /unittests/autotestscripts/check_debug_dlls.pl | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'unittests/autotestscripts/check_debug_dlls.pl')
| -rw-r--r-- | unittests/autotestscripts/check_debug_dlls.pl | 25 |
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 ); + } + } |