谁能告诉我在Delphi中这个vb代码的等价物是什么?
我需要使用:
ResetMyEvent: THandle; //??
Run Code Online (Sandbox Code Playgroud)
这些VB行从一个小型控制台应用程序复制.没有可视组件.
谢谢.
Module MyModule
Private WithEvents Obj As MyInterface
Private WaitForStartLibrary As AutoResetEvent = New AutoResetEvent(False)
Sub Main()
Obj.StartLibrary(param1, param2,...)
If WaitForStartLibrary.WaitOne(5000) = False Then//How can I do this w/out timer comp ?
Throw New Exception("Operation timed out")
End If
End Sub
//Event
Private Sub StartLibraryCallBack() Handles Obj.StartLibraryCallBack
WaitForStartLibrary.Set()
End Sub
Run Code Online (Sandbox Code Playgroud)