IDSFLog::Enabled Property
The Enabled property gets or sets the enabled state for a log object.
This property is read/write.
Syntax
HRESULT put_Enabled(
[in] VARIANT_BOOL fvarEnabled
);
HRESULT get_Enabled(
[out, retval] VARIANT_BOOL *pfvarEnabled
);
Property Value
The new enabled state.
Error Codes
Enabled returns S_OK if the operation succeeds.
Remarks
A disabled log object writes nothing.
The following VBScript code example shows how to enable and disable DSF logging while a test case is executed.
Dim DSFObj : Set DSFObj = CreateObject("DSF.DSF")
Dim DSFLog : Set DSFLog = DSFObj.Log
' Enable logging
DSFLog.Enabled = TRUE
' Write to the log file
DSFLog.Write "Simulated driver is starting"
' Test the simulator
TestSimulator
DSFLog.Write "Test is complete"
DSFLog.Enabled = FALSE
Requirements
Header |
DSFif.h |
See Also
Send comments about this topic to Microsoft
Build date: 9/21/2010