Perl 根据 Windows 的错误码获取详细的描述信息

2015-12-14 0 475
Perl 根据 Windows 的错误码获取详细的描述信息
# This function takes the error number returned by the Win32::GetLastError function.
          
#!/usr/bin/perl -w

use Win32;

$ApplicationName = 'c:\winnt\system32\notepad.exe';
$CommandLine     = "notepad";

# Spawn the process.
$status = Win32::Spawn( $ApplicationName,$CommandLine,$ProcessId );

if ( $status != 0 ) {
    print "Launched process with ID $ProcessId.\n";
} else {    
    print "Failed to launch process.\n";
    print Win32::FormatMessage( Win32::GetLastError() );
}

遇见资源网 perl Perl 根据 Windows 的错误码获取详细的描述信息 http://www.ox520.com/13213.html

上一篇:

已经没有上一篇了!

下一篇:

已经没有下一篇了!

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务