IVHooks interface : ProtocolFinished method

ProtocolFinished method
Event
A protocol is finished.
Description
VWorks software calls the ProtocolFinished method after a protocol is finished.
Syntax
 
HRESULT ProtocolFinished(
[in] BSTR sXML,
[in, out] BSTR* sResultXML
);
Parameters
 
ProtocolFinished method input
VWorks software passes a ProtocolFinished XML element into the sXML parameter of the ProtocolFinished method. This XML element provides information about the protocol that is finished.
ProtocolFinished element
The ProtocolFinished element has the following attributes:
 
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.
1 = Startup
2 = Main
3 = Cleanup
Example of ProtocolFinished method input
The following sample code is a ProtocolFinished XML element that is received by the plugin from VWorks software as a string in the sXML parameter of the ProtocolFinished method. VWorks software tells the plugin that the protocol named MyProtocol.pro is finished in the Cleanup Protocol.
 
<ProtocolFinished Path='C:\V11\MyProtocol.pro' ProtocolType='3' />
ProtocolFinished method output
The plugin returns a HookResults XML block in the sResultXML parameter of the ProtocolFinished method. For information about the structure and contents of this XML block, see “HookResults XML block” .
Example of ProtocolFinished 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 ProtocolFinished method. The plugin tells VWorks software to write the following Info-type message to the Main Log:
MyProtocol.pro is finished.
 
<HookResults>
<Results>
<HookResult ResultType='Log Message'
ResultValue='MyProtocol.pro is finished.' />
</Results>
</HookResults>
Related information