吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 559|回复: 0
收起左侧

[讨论] windbg初尝试

[复制链接]
tomzhxc1794 发表于 2022-11-13 16:33
参考https://www.52pojie.cn/thread-802265-1-1.html 做下面的尝试
自己用delphi写的测试程序
下面是验证的一些图

unit Unit1;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
gcsName: TRTLCriticalSection;
hThread: THandle;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
WaitForSingleObject(hThread,INFINITE);
end;

function MyThreadFun(p: Pointer): Integer; stdcall;
begin
EnterCriticalSection(gcsName);
LeaveCriticalSection(gcsName);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin

WaitForSingleObject(hThread,INFINITE);
end;

procedure TForm1.FormCreate(Sender: TObject);
var
ID:DWORD;
begin
EnterCriticalSection(gcsName);
hThread:=CreateThread(nil, 0, @MyThreadFun, nil, 0, ID);
end;

initialization
InitializeCriticalSection(gcsName);
finalization
DeleteCriticalSection(gcsName);

end.

2022-11-13_162153.png
2022-11-13_162304.png
2022-11-13_162347.png
2022-11-13_162410.png
2022-11-13_162447.png
2022-11-13_162504.png
2022-11-13_162530.png
2022-11-13_162549.png
2022-11-13_162624.png

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-4 08:03

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表