首页
社区
课程
招聘
[旧帖] [求助]关于PB互斥体的问题,看了论坛的很多方法都不能解决 0.00雪花
发表于: 2009-1-9 15:35 3090

[旧帖] [求助]关于PB互斥体的问题,看了论坛的很多方法都不能解决 0.00雪花

2009-1-9 15:35
3090
系统是内部自行开发的,但由于以前的一个设计造成现在的困扰:
PB7.0开发的系统,使用PBKILLER查到源码如下:
---------------------------------------------------------------
string ls_appname

if handle(getapplication()) > 0 then
        ls_appname = getapplication().filetype
        createmutexa(0,true,ls_appname)

        if getlasterror() = 183 then
                messagebox("提示信息","“" + gs_appname + "”应用系统已经运行!",stopsign!)
                return true
        end if

end if

return false
---------------------------------------------------------------

************************************
使用Pbvm70.dll调用kernel32.createmutexA

使用w32asm反编译Pbvm70.dll如下

kernel32.createmutexA

call dword ptr [11497204]
mov dword ptr [ebx+0c],eax
test eax,eax
jne 1147c747

kernel32.getlasterror

call dword ptr [1149732c]
cmp eax,000000B7
je 1147c70c
test ebx,ebx
je 1147c751
cmp dword ptr [ebx+0c],00000000
je 1147c751

mov eax,00000001
pop ebp
pop edi
pop esi
pop ebx
ret
**************************************

查了网上及本论坛的一些资料,把

call dword ptr [1149732c]
cmp eax,000000B7
je 1147c70c

改为

call dword ptr [1149732c]
cmp eax,000000B7
jne 1147c70c



call dword ptr [1149732c]
cmp eax,000000B7
jmp 1147c70c

但都不行,请论坛的高手帮忙解决一下。

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
这个问题是很老的问题吗
2009-1-9 16:20
0
游客
登录 | 注册 方可回帖
返回