CreateEvent怎么用?
Declare Function CreateEvent Lib "kernel32.dll" (ByVal bManualReset As LPSECURITY_ATTRIBUTES, ByVal bInitialState As Long, ByVal lpName As String) As Long这里出现 用户定义类型未定义
哪位大侠帮帮忙,我在线等哈,谢了
Public Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As SECURITY_ATTRIBUTES, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long
Public Type SECURITY_ATTRIBUTES
nLength As Long
bInheritHandle As Long
lpSecurityDescriptor As Long
End Type
可以了,不过新问题出现了,呵呵,希望大侠能帮忙
Public Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As SECURITY_ATTRIBUTES, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long
Public Type SECURITY_ATTRIBUTES
nLength As Long
bInheritHandle As Long
lpSecurityDescriptor As Long
End Type
Call CreateEvent(Null, 1, w_0)
ryref 参数类型不符 Public Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (ByVal lpEventAttributes As Long, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long
我这样了 传递给他一个0,那是不是默认的安全属性?
是的。
补充:VB , API