IScheduledItems::Item

[This is preliminary documentation and subject to change.]

The Item method returns for a show reminder the show reference, the application to start, the working directory, the interval before the show that advance notification should occur, and any optional command-line parameters.

HRESULT Item(
  BSTR  Index,           // in
  BSTR * User,           // out
  BSTR * ShowReference,  // out
  BSTR * Application,    // out
  BSTR * Directory,      // out
  long * AdvanceMinutes,  // out
  BSTR * Parameters,     // out
  VARIANT * Task         // out
);
 

Parameters

Index
Index of the show reminder for which to retrieve information.
User
Pointer to a BSTR that receives the name of the owner of the DAO workspace used to schedule the reminder.
ShowReference
Pointer to a BSTR where this method returns the show reference string. For more information about the format of this string, see Show Reference Format.
Application
Pointer to a BSTR that receives the name and path of the application used to display the reminder to the user. Typically, WebTV for Windows is used to display reminders, and this value is set to C:\Program Files\TV Viewer\Tvx.exe.

Your application can get the path to the broadcast client's installation of WebTV for Windows by calling ITelevisionServices::get_DatabaseFile and stripping Tss.mdb off the end of the returned string. This path is also stored in this registry entry:

HKLM\Software\Microsoft\TV Services\ProductDir

Directory
Pointer to a BSTR that receives the working directory that contains the reminder application.
AdvanceMinutes
Pointer to a long that receives the interval, in minutes, before the show's start that the reminder should be displayed.
Parameters
Additional command-line arguments for the application specified by the Application parameter. The format and number of these arguments depend on the application referred to by Application. Parameters is passed to Application as command-line arguments.

For example, if you are using a custom application to display the reminder to the user, and this application has three styles of reminder dialog boxes, Parameters could be used to specify the reminder style.

For a list of the parameters used with the WebTV for Windows reminder application, Tvx.exe, see the description of WebTVforWindowsParameters in Show Reminder Format.

Task
Address where this method returns a VARIANT data type containing an Task object, from which you can obtain the TaskTrigger object. The TaskTrigger object contains additional information about when and how the scheduled reminder will run. To locate more information about TaskTrigger and its interface ITaskTrigger, see Further Information on Television Services for the Client.

Return Values

Returns an HRESULT indicating success or failure. If the method succeeds, it returns S_OK. Otherwise, it returns an error code. For specific error codes, see the Winerror.h and Dbdaoerr.h header files. To locate more information about Winerror.h and Dbdaoerr.h, see Further Information on Television Services for the Client.

Remarks

The Task parameter is returned as a VARIANT instead of as a Task object to enable Visual Basic programmers to safely use the IScheduledItems::Item method. Visual Basic cannot access the ITask interface; if Item did not return the Task object as a VARIANT, Visual Basic programmers could not correctly release the object.

If you are programming in C++, simply cast the VARIANT to an ITask interface variable.

If you are programming in Visual Basic, you should create a variable of type Variant and pass it as the Task parameter. Do not use this variable after you call Item. When the variable goes out of scope, Visual Basic releases the Task object it references. It is recommended that you declare the Variant variable as local in a function that calls the Item method. Such a declaration causes the Task object to be released quickly.

To locate more information on ITask and VARIANT, see Further Information on Television Services for the Client.

QuickInfo

  Windows NT: Unsupported.
  Windows: Requires Windows 98.
  Windows CE: Unsupported.
  Header: Declared in tssadmin.odl.
  Import Library: Included as a resource in tssadmin.dll.
  Unicode: Yes.

See Also

IScheduledItems::get__NewEnum, IScheduledItems::get_Count