[This is preliminary documentation and subject to change.]
The LoadEnhancementsFromFile method loads the enhancements listed in a text file into the Guide database.
HRESULT LoadEnhancementsFromFile(
Workspace *piDAOWorkspace,
BSTR bstrEnhancementsFile
);
GUID |
Title |
Show Reference |
Preload URL |
Address |
Expiration Date |
where each column contains the following data:
If the Show Reference field contains an episode title, the enhancement is treated as an episode enhancement and is set for only the episode or episodes specified.
If Show Reference contains an empty episode title (""), the enhancement is treated as a channel enhancement. In this case, LoadEnhancementsFromFile searches the tuning space for the union of the station, network, and channel parameters specified in Show Reference. The method then sets an enhancement for all matching channel records. For example:
"1997/7/29!26673/7175/9690!0:30!0!0!0!0!9690!9690!4096!7040!''!'MSNBC'!3!54!InterNight".
For further description of show reference syntax, see Show Reference Format.
For example, if you specify "TVShow\TVShow.htm"
for the PreloadURL parameter, the URL resolves to "C:\Program Files\TV Viewer\Layouts\TVShow\TVShow.htm"
.
"125.125.125.125\t225.225.225.255\t10024"
To locate more information about the Jet ISAM, see Further Information on Television Services for the Client.
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. For more information about Winerror.h and Dbdaoerr.h, see Further Information on Television Services for the Client.
In addition to requiring you to create an enhancement text file with the proper format, ISAM also requires you to include a schema file in the same directory as that text file. The schema file must be named Schema.ini and specify the name of the text file in its first line, enclosed in brackets ([ ]).
For example, if your application should load E:\Windows\Attach.txt, you must create a file named Schema.ini in the E:\Windows directory, with [Attach.txt]
as the first line in the Schema.ini.
The following schema file is valid for comma-delimited files. Replace Attachments.txt with the name of your enhancement text file.
----------Schema.ini-----------
[Attachments.txt]
Format=CSVDelimited
ColNameHeader=False
CharacterSet=ANSI
Col1=ID Text
Col2=Title Text
Col3="Show Reference" Text
Col4="Preload URL" Text
Col5=Address Text
Col6="Expiration Date" DateTime
The following schema file is valid for tab-delimited files. Replace Attachments.txt with the name of your enhancement text file.
-------Schema.ini--------
[Attachments.txt]
Format=TabDelimited
ColNameHeader=False
CharacterSet=ANSI
Col1=ID Text
Col2=Title Text
Col3="Show Reference" Text
Col4="Preload URL" Text
Col5=Address Text
Col6="Expiration Date" DateTime
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.
ITelevisionServices::DeleteEnhancementFromID, ITelevisionServices::DeleteOldEnhancements, ITelevisionServices::LoadEnhancement, ITelevisionServices::RemapEnhancements