在VB6中如何调用API中的createthread函数?
Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Boolean
End Type
Declare Function CreateThread Lib "kernel32" (lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
Public Function ThrPath(CurPath As String)
Dim threadid As Long, hnd As Long
dim lpThreadAttributes as SECURITY_ATTRIBUTES
hnd = CreateThread(lpThreadAttributes, 0&, AddressOf myfunction, ByVal myParm, ByVal 0&, threadid)
End Function
我不知道lpThreadAttributes应该给何值。线程才创建成功。