Platform SDK: Broadcast Architecture

IATVEFPackage::Initialize

Initializes a new, empty package with a MIME content expiration date.

HRESULT Initialize(
  DATE MIMEContentExpires
);

Parameters

MIMEContentExpires
The date and time after which the contents of the entire package are no longer valid or no longer needed by the interactive show. If set to zero, no "Expires:" field will be written to the header for the package as a whole (see Remarks).

Return Value

Returns S_OK if the method succeeds; otherwise, an error code is returned.

Remarks

There can only be one package associated with a CATVEFPackage object. You must call Initialize exactly once before calling AddFile. Any subsequent calls to Initialize after the package has been initialized will fail. A package cannot be sent until it has been closed, and after it has been closed, no new files may be added to it. A closed package remains available to be re-sent until the object is destroyed.

The specification requires all packages as well as the individual files they contain to be preceded by an HTTP-style header. If the MIMEContentExpires parameter contains a non-zero value, the component will use it to write the "Expires" field in that header for the entire package. 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.

If your application needs to transmit more than one package, it should create multiple CATVEFPackage objects as described in Co-creating a Package Class Instance.

Requirements

  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.

See Also

Creating Packages