| 发表于:2008-01-23 16:33:262楼 得分:0 |
mutexhandle: thandle; //定义互斥句柄 mutexhandle := createmutex(nil, true, application.title); if mutexhandle <> 0 then begin if getlasterror = error_already_exists then begin messagebox(0, '程序已经运行...', '不好意思', mb_iconhand); closehandle(mutexhandle); halt; // initiates abnormal termination of a program. end; end; | | |
|