IVHooks interface : Deadlock method

Deadlock method
Event
A deadlock occurred.
Description
VWorks software calls the Deadlock method after a deadlock occurs.
Syntax
 
HRESULT Deadlock(
[in] BSTR sXML,
[in, out] BSTR* sResultXML
);
Parameters
 
Deadlock method input
VWorks software passes a Deadlock XML element into the sXML parameter of the Deadlock method. This XML element provides the file path to the protocol that generated the event.
Deadlock element
The Deadlock element has the following attribute:
 
If the protocol has been saved, the value of this attribute is the protocol’s file path. If the protocol has not been saved, the value is the default protocol name.
Example of Deadlock method input
The following sample code is a Deadlock XML element that is received by the plugin from VWorks software as a string in the sXML parameter of the Deadlock method. VWorks software tells the plugin that the protocol named Protocol File  1 encountered a deadlock during execution.
 
<Deadlock Path='Protocol File - 1' />
Deadlock method output
The plugin returns a HookResults XML block in the sResultXML parameter of the Deadlock method. For information about the structure and contents of this XML block, see “HookResults XML block” .
Example of Deadlock method output
The following sample code is a HookResults XML block that is returned to VWorks software by the plugin as a string in the sResultXML parameter of the Deadlock method. The plugin tells VWorks software to write the following Info-type message to the Main Log:
A deadlock occurred during execution of ProtocolFile - 1.
 
<HookResults>
<Results>
<HookResult ResultType='Log Message'
ResultValue='A deadlock occurred during execution of ProtocolFile - 1.' />
</Results>
</HookResults>
Related information