WriteToString Method in Class SMS_ScheduleMethods
The WriteToString WMI class method encodes SMS_ScheduleToken data into an SMS interval string.
The following syntax is simplified from MOF code and is intended to show you the definition of the method.
sint32 WriteToString(
[in] SMS_ScheduleToken TokenData[],
[out] string StringData
);
Parameters
TokenData
Data type: SMS_ScheduleToken[]
Qualifiers: InSchedule token from which the interval string is encoded.
StringData
Data type: string
Qualifiers: OutEncoded interval string.
Return Values
The WriteToString method returns a sint32 that is always zero (0).
Example Code
The following example encodes an SMS schedule interval string from a schedule token.
Dim clsScheduleMethods As SWbemObject Dim sInterval As String Dim instToken As SWbemObject Set instToken = Services.Get("SMS_ST_NonRecurring").SpawnInstance_ instToken.StartTime = "20000602080000.000000+***" Set clsScheduleMethods = Services.Get("SMS_ScheduleMethods") clsScheduleMethods.WriteToString Array(instToken), sInterval MsgBox "interval = " & sInterval