| 发表于:2007-02-01 17:29:443楼 得分:35 |
可以用互斥体解决, //程序开始时,定个名字如:yourprojname,创建互斥体 hmutex := createmutex(nil, false, 'yourprojname '); if getlasterror = error_already_exists then halt; 程序结束时 releasemutex(hmutex); // release the mutex as a politeness closehandle(hmutex); | | |
|