[This is preliminary documentation and subject to change.]
The AddFromQuery method schedules reminders for all the television shows in the result set of a DAO QueryDef query.
HRESULT AddFromQuery(
BSTR Workspace, // in
BSTR QueryName, // in
BSTR Application, // in
BSTR Directory, // in
long AdvanceMinutes, // in
BSTR Parameters, // in
VARIANT * pSafeArray // out
);
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
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.
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.
The AddFromQuery method iterates through the result set of the defined query, composing a show reference for each row and scheduling a reminder for that show reference. Typically, you use the queries created by ITelevisionServices::ResolveBroadcast as the QueryName parameter for AddFromQuery.
Reminders set using AddFromQuery are not automatically visible in the WebTV for Windows user interface. In order for a TSS-set reminder to be visible in WebTV for Windows, it must meet certain standards. Setting a Reminder That Appears in WebTV for Windows specifies these standards.
To locate more information on the SAFEARRAY data type, see Further Information on Television Services for the Client.
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.
IScheduledItems::Add, IScheduledItems::Remove, ITelevisionServices::ResolveBroadcast