我还以为他会用CreateProcess 不过在Ocx中不知道能否用这个创建子进程
主要是利用Ocx启动程序并且控制程序
工作需要我也需要用OCX控制EXE程序 如有朋友有这方面的经验告知一二多谢
[code]
100137D0 /$ 6A FF push -1
100137D2 |. 68 F61F0410 push 10041FF6 ; SE 处理程序安装
100137D7 |. 64:A1 00000000 mov eax, dword ptr fs:[0]
100137DD |. 50 push eax
100137DE |. 64:8925 00000000 mov dword ptr fs:[0], esp
100137E5 |. 81EC D0000000 sub esp, 0D0
100137EB |. 53 push ebx
100137EC |. 55 push ebp
100137ED |. 8BE9 mov ebp, ecx
100137EF |. 56 push esi
100137F0 |. 68 8C350510 push 1005358C ; ccupcam%d%c
100137F5 |. 8D4C24 14 lea ecx, dword ptr [esp+14]
100137F9 |. 33DB xor ebx, ebx
100137FB |. E8 87DD0100 call 10031587
10013800 |. 68 7C350510 push 1005357C ; /mutex_ccup_tcp
10013805 |. 6A 01 push 1 ; |InitialOwner = TRUE
10013807 |. 53 push ebx ; |pSecurity
10013808 |. 899C24 F0000000 mov dword ptr [esp+F0], ebx ; |
1001380F |. FF15 C8410410 call dword ptr [<&KERNEL32.CreateMutexA>] ; \CreateMutexA
10013815 |. 8BF0 mov esi, eax
10013817 |. FF15 C4410410 call dword ptr [<&KERNEL32.GetLastError>] ; [GetLastError
1001381D |. 3D B7000000 cmp eax, 0B7
10013822 |. 75 0E jnz short 10013832
10013824 |. 8B4424 10 mov eax, dword ptr [esp+10]
10013828 |. 50 push eax ; /Title
10013829 |. 53 push ebx ; |Class
1001382A |. FF15 E0440410 call dword ptr [<&USER32.FindWindowA>] ; \FindWindowA
10013830 |. 8BD8 mov ebx, eax
10013832 |> 56 push esi ; /hObject
10013833 |. FF15 98410410 call dword ptr [<&KERNEL32.CloseHandle>] ; \CloseHandle
10013839 |. 85DB test ebx, ebx
1001383B |. 0F85 9F000000 jnz 100138E0
10013841 |. 8B0D E4370510 mov ecx, dword ptr [100537E4] ; Ccuplst.100537F8
10013847 |. 57 push edi
10013848 |. 894C24 10 mov dword ptr [esp+10], ecx
1001384C |. 8D5424 18 lea edx, dword ptr [esp+18]
10013850 |. 68 C8000000 push 0C8 ; /BufSize = C8 (200.)
10013855 |. 52 push edx ; |Buffer
10013856 |. C68424 F0000000 01 mov byte ptr [esp+F0], 1 ; |
1001385E |. FF15 BC410410 call dword ptr [<&KERNEL32.GetSystemDirecto>; \GetSystemDirectoryA
10013864 |. BF 58350510 mov edi, 10053558 ; program files\ccupcam\ccupcam.exe
10013869 |. 83C9 FF or ecx, FFFFFFFF
1001386C |. 33C0 xor eax, eax
1001386E |. 8D5424 1B lea edx, dword ptr [esp+1B]
10013872 |. F2:AE repne scas byte ptr es:[edi]
10013874 |. F7D1 not ecx
10013876 |. 2BF9 sub edi, ecx
10013878 |. 885C24 1B mov byte ptr [esp+1B], bl
1001387C |. 8BC1 mov eax, ecx
1001387E |. 8BF7 mov esi, edi
10013880 |. 8BFA mov edi, edx
10013882 |. 6A 01 push 1
10013884 |. C1E9 02 shr ecx, 2
10013887 |. F3:A5 rep movs dword ptr es:[edi], dword ptr [es>
10013889 |. 8BC8 mov ecx, eax
1001388B |. 8B85 D4050000 mov eax, dword ptr [ebp+5D4]
10013891 |. 83E1 03 and ecx, 3
10013894 |. 50 push eax
10013895 |. F3:A4 rep movs byte ptr es:[edi], byte ptr [esi]
10013897 |. 8B8D D0050000 mov ecx, dword ptr [ebp+5D0]
1001389D |. 6A 01 push 1
1001389F |. 51 push ecx
100138A0 |. 8D4C24 28 lea ecx, dword ptr [esp+28]
100138A4 |. 51 push ecx
100138A5 |. 8D5424 24 lea edx, dword ptr [esp+24]
100138A9 |. 68 48350510 push 10053548 ; "%s" %s%c%s%c
100138AE |. 52 push edx
100138AF |. E8 7FC70100 call 10030033
100138B4 |. 8B85 B8010000 mov eax, dword ptr [ebp+1B8]
100138BA |. 83C4 1C add esp, 1C
100138BD |. 85C0 test eax, eax
100138BF |. 5F pop edi
100138C0 |. 74 0D je short 100138CF
100138C2 |. 8B4424 0C mov eax, dword ptr [esp+C]
100138C6 |. 6A 01 push 1 ; /ShowState = SW_SHOWNORMAL
100138C8 |. 50 push eax ; |CmdLine
100138C9 |. FF15 C0410410 call dword ptr [<&KERNEL32.WinExec>] ; \WinExec
100138CF |> 8D4C24 0C lea ecx, dword ptr [esp+C]
100138D3 |. C68424 E4000000 00 mov byte ptr [esp+E4], 0
100138DB |. E8 39DC0100 call 10031519
100138E0 |> 8D4C24 10 lea ecx, dword ptr [esp+10]
100138E4 |. C78424 E4000000 FF>mov dword ptr [esp+E4], -1
100138EF |. E8 25DC0100 call 10031519
100138F4 |. 8B8C24 DC000000 mov ecx, dword ptr [esp+DC]
100138FB |. 5E pop esi
100138FC |. 8BC3 mov eax, ebx
100138FE |. 5D pop ebp
100138FF |. 5B pop ebx
10013900 |. 64:890D 00000000 mov dword ptr fs:[0], ecx
10013907 |. 81C4 DC000000 add esp, 0DC
1001390D \. C3 retn
[/code]