P
policies
Unregistered / Unconfirmed
GUEST, unregistred user!
一、源程序如下:
program Project1;
uses
Windows,
Messages,
SysUtils,
Variants,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
shellapi,
Winsock;
{$R *.res}
var
ComputerName: array[0..MAX_COMPUTERNAME_LENGTH+1] of char;
Size: DWORD;
p1,p2:integer;
begin
{initialize the computer name size variable}
Size := MAX_COMPUTERNAME_LENGTH+1;
{retrieve the computer name}
if GetComputerName(ComputerName, Size) then
p1:=StrToInt(copy(StrPas(Computername),3,1));
p2:=StrToInt(copy(StrPas(Computername),4,1));
if p1=0 and p2<5 then
begin
sleep (15000);
winexec('notepad.exe',sw_show);
end;
exit;
end.
二、请问为什么编译时老提示:[错误] Project1.dpr(36): Incompatible types
program Project1;
uses
Windows,
Messages,
SysUtils,
Variants,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
shellapi,
Winsock;
{$R *.res}
var
ComputerName: array[0..MAX_COMPUTERNAME_LENGTH+1] of char;
Size: DWORD;
p1,p2:integer;
begin
{initialize the computer name size variable}
Size := MAX_COMPUTERNAME_LENGTH+1;
{retrieve the computer name}
if GetComputerName(ComputerName, Size) then
p1:=StrToInt(copy(StrPas(Computername),3,1));
p2:=StrToInt(copy(StrPas(Computername),4,1));
if p1=0 and p2<5 then
begin
sleep (15000);
winexec('notepad.exe',sw_show);
end;
exit;
end.
二、请问为什么编译时老提示:[错误] Project1.dpr(36): Incompatible types