?? target.dpr
字號:
program Target;
{$APPTYPE CONSOLE}
{$HINTS OFF}
uses Windows;
var
cs : RTL_CRITICAL_SECTION;
function ProtMB : LongWord; stdcall begin
EnterCriticalSection(cs);
Result := MessageBoxA(0,'Inside CS.','Target.exe', MB_OK);
LeaveCriticalSection(cs);
end;
exports
ProtMB;
begin
InitializeCriticalSection(cs);
//Block cs:
//ProtMB;
MessageBoxA(0,'Press OK to enter CS.','Target.exe',0);
//Enter entered == blocked cs -> wait forever:
ProtMB;
DeleteCriticalSection(cs);
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -