Description
The ValidateDevice method gives devices a chance to notify the system if there's some aspect of the configuration of the device that is invalid. Every loaded device is validated after system modules are loaded or unloaded, so devices must be able to allow this method to run multiple times, and at potentially any time after device creation. Returning false from this method indicates that the device cannot execute with the current configuration.
The main purpose of this method is to validate the device connections to other devices. The AddReference method is called during device construction to link it to other devices. If a required link for a device has not been established, the ValidateDevice method should return false.
Usage
virtual bool ValidateDevice();
Return value
- [bool]
- True if the device was validated successfully, false otherwise. If a device returns false from this method, the system will consider the device to be in an invalid state, and the system will not be allowed to execute.