Login

VB多线程源码_无DLL真正稳定多线程实现

下载次数:60更新时间: 2023-06-10 19:10:02 加入收藏 立即下载

'Download by http://www.tugaga.com

1.jpg

Dim mHandle As Long

Dim lpThreadId As Long

Private Declare Function CreateThread Lib "kernel32" (ByVal lpSecurityAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long

Private Declare Function TerminateThread Lib "kernel32" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long

Private Sub Command1_Click()

    mHandle = CreateThread(ByVal 0&, ByVal 0&, AddressOf Thread1, ByVal 0&, 0&, lpThreadId)

End Sub

Private Sub Command2_Click()

    Call TerminateThread(mHandle, ByVal 0&)

End Sub

Private Sub Form_Initialize()

    'init Faking

    Call InitFakeHeader

End Sub


土粉评论

暂无评论