3
32881
Unregistered / Unconfirmed
GUEST, unregistred user!
program GAGA;
uses
windows;
//文件是否存在
function FileExists(const FileName: string): Boolean;
var
Handle: THandle;
FindData: TWin32FindData;
begin
Handle := FindFirstFileA(PChar(FileName), FindData);
result:= Handle <> INVALID_HANDLE_VALUE;
end;
//写记事本
procedure Log2( s : PChar);stdcall;
var
F : TextFile;
begin
assignfile(f,'c:/记事本.txt');
if fileexists('c:/记事本.txt') then
append(f)
else
rewrite(f);
writeln(f,s);
closefile(f);
end;
procedure ceshi();
begin
sleep(10000);
log2('好了。。');
end;
var
TID: dword;
//程序入口
begin
CreateThread(nil, 0, @ceshi, nil, 0, TID);
end.
调试发现不运行 procedure ceshi();
中的东西,,为什么呢?
uses
windows;
//文件是否存在
function FileExists(const FileName: string): Boolean;
var
Handle: THandle;
FindData: TWin32FindData;
begin
Handle := FindFirstFileA(PChar(FileName), FindData);
result:= Handle <> INVALID_HANDLE_VALUE;
end;
//写记事本
procedure Log2( s : PChar);stdcall;
var
F : TextFile;
begin
assignfile(f,'c:/记事本.txt');
if fileexists('c:/记事本.txt') then
append(f)
else
rewrite(f);
writeln(f,s);
closefile(f);
end;
procedure ceshi();
begin
sleep(10000);
log2('好了。。');
end;
var
TID: dword;
//程序入口
begin
CreateThread(nil, 0, @ceshi, nil, 0, TID);
end.
调试发现不运行 procedure ceshi();
中的东西,,为什么呢?