EasyManua.ls Logo

AMD SimNow Simulator 4.4.5 - Page 172

AMD SimNow Simulator 4.4.5
269 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AMD Confidential
User Manual November 21
st
, 2008
160 Chapter 12: Command API
use Win32::OLE;
use Win32::OLE::Variant;
$Win32::OLE::Warn = 3;
$cmd = Win32::OLE->new('SimNow.Command')
or die "Cannot open SimNow.Command\n";
$MyResponse = Variant(VT_BSTR | VT_BYREF, "");
do {
print "simnow> ";
$CmdLine = <>;
chomp($CmdLine);
if ($CmdLine)
{
if ($cmd->Exec($CmdLine, $MyResponse))
{
print "$MyResponse\n";
}
else
{
$cmd->GetLastError($MyResponse);
print "Cannot Exec: $MyResponse\n";
}
}
} while ($CmdLine);
print "\ndone\n";
Example 12-1: Perl Sample CMDAPI Source Code

Table of Contents