Navigation:  Object Model Reference > Builder Object >

CancelEvent Property

Previous pageReturn to chapter overviewNext page

Returns a handle to the Win32 event that will be set if the build is aborted.  Read-only.




builder.CancelEvent As Long





       Builder object


See Also


Applies to Builder object



A custom user action can use this event to test for user cancellation of the build.  The VB6 code to perform this check is:


' in declares section

Private Declare Function WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long


' in action's ICustomAction_BuildStep method

' should be called regularly during long a running action

' to check for cancellation of the build

If WaitForSingleObject(Builder.CancelEvent, 0) = 0 Then

       ICustomAction_BuildStep = vbldStepStatAborted

       Exit Function

End If