Platform SDK: Broadcast Architecture |
Adds a file to an existing package that was created with Initialize.
HRESULT AddFile( LPOLESTR szFilename, LPOLESTR szMIMEContentLocation, LPOLESTR szMIMEContentType, DATE ExpiresDate, LONG MIMEContentLanguageId, BOOL fCompress );
Returns S_OK if the method succeeds; otherwise, an error code is returned.
The content-location parameter refers to an "lid://" namespace in the client's cache that can be used to group files according to unique local identifiers. When a trigger is sent, it can reference this same namespace to tell the client where to look for the file being invoked.
The specification requires all packages as well as the individual files they contain to be preceded by an HTTP-style header. If the ExpiresDate parameter contains a valid date, the component will use it to write the "Expires" field in that header for this particular file. If this value is set to zero, the "Expires" field will not be written at all. See Creating An Announcement for an example of how to create a DATE variable.
For further information on MIME content attributes and HTTP-style headers for resources, see the ATVEF specification.
This method will fail if you attempt to add files to a package that has not yet been created using Initialize, or that has been closed with the Close method.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 98.
Header: Declared in atvefsnd.idl.
Import Library: Included as a resource in atvefsnd.dll.