完整代码: program SERVER; uses Windows; type TWin = record Msg: TMsg; wClass: TWndClass; hMain: integer; end; var Win: TWin; begin CreateMutex(nil, TRUE, 'Q360FileCheckMutex'); while (GetMessage(win.Msg, win.hmain, 0, 0)) do begin TranslateMessage(win.Msg); DispatchMessage(win.Msg); end end.