Platform SDK: Broadcast Architecture |
Initializes a new, empty package with a MIME content expiration date.
HRESULT Initialize( DATE MIMEContentExpires );
Returns S_OK if the method succeeds; otherwise, an error code is returned.
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.
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.