HP Operations Manager for Windows

 

IOvPmdStream Interface Reference

PMAD Stream interface. More...

import "OvPmdStream.idl";

Inheritance diagram for IOvPmdStream:

IOvPmdStream2 List of all members.

Public Types

enum   OVPMD_STREAM_SEEK { OVPMD_STREAM_SEEK_SET = 0, OVPMD_STREAM_SEEK_CUR = 1, OVPMD_STREAM_SEEK_END = 2 }
enum   OVPMD_STGC {
  OVPMD_STGC_DEFAULT = 0, OVPMD_STGC_OVERWRITE = 1, OVPMD_STGC_ONLYIFCURRENT = 2, OVPMD_STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
  OVPMD_STGC_CONSOLIDATE = 8
}

Public Member Functions

HRESULT  ReadBoolean ([out, retval] VARIANT_BOOL *v)
HRESULT  ReadByte ([out, retval] BYTE *v)
HRESULT  ReadDate ([out, retval] DATE *v)
HRESULT  ReadCurrency ([out, retval] CURRENCY *v)
HRESULT  ReadFloat ([out, retval] float *v)
HRESULT  ReadDouble ([out, retval] double *v)
HRESULT  ReadInt ([out, retval] short *v)
HRESULT  ReadLong ([out, retval] long *v)
HRESULT  ReadString ([out, retval] BSTR *v)
HRESULT  ReadVariant ([out, retval] VARIANT *v)
HRESULT  Read ([out] VARIANT *pv,[in] long cb,[out] long *pcbRead)
HRESULT  WriteBoolean ([in] VARIANT_BOOL v)
HRESULT  WriteByte ([in] BYTE v)
HRESULT  WriteDate ([in] DATE v)
HRESULT  WriteCurrency ([in] CURRENCY v)
HRESULT  WriteFloat ([in] float v)
HRESULT  WriteDouble ([in] double v)
HRESULT  WriteInt ([in] short v)
HRESULT  WriteLong ([in] long v)
HRESULT  WriteString ([in] BSTR v)
HRESULT  WriteVariant ([in] VARIANT v)
HRESULT  Write ([in] VARIANT *v,[in] long l,[out, retval] long *al)
HRESULT  Clone ([in, out] IOvPmdStream **stream)
HRESULT  Seek ([in] long offset,[in] long origin,[out] long *newPosition)
HRESULT  SetSize ([in] long newSize)
HRESULT  CopyTo ([in, unique] IOvPmdStream *destStream,[in] long bytesToCopy,[out] long *bytesRead,[out] long *bytesWritten)
HRESULT  Commit ([in] long commitFlags)
HRESULT  Revert ()
HRESULT  SeekEx ([in] long offset,[in] long origin,[out, retval] long *newPosition)
HRESULT  CopyToEx ([in, unique]IOvPmdStream *pDestStream,[in] long lBytesToCopy,[out, retval]long *plBytesWritten)

Detailed Description

The interface IOvPmdStream provides methods to manage data streams within the Policy Management and Deployment component.
Note:
The ReadVariant() method checks the type of value being read from the stream. No other read methods do any type checking. The developer is responsible for it! For each "Write" method in your program, a corresponding "Read" method is required to extract the data again.
Since:
6.x

Member Enumeration Documentation

enum IOvPmdStream::OVPMD_STGC
 

Enumeration of the storage element commit types. Used in the Commit() method.

Since:
6.x
Enumerator:
OVPMD_STGC_DEFAULT  Default.
OVPMD_STGC_OVERWRITE  Overwrite.
OVPMD_STGC_ONLYIFCURRENT  Only current.
OVPMD_STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE  Commit merely to diskcache (might be dangerous).
OVPMD_STGC_CONSOLIDATE  Consolidate.
enum IOvPmdStream::OVPMD_STREAM_SEEK
 

Enumeration of the storage element seek types

Since:
6.x
Enumerator:
OVPMD_STREAM_SEEK_SET  Beginning of the stream.
OVPMD_STREAM_SEEK_CUR  Current seek pointer location.
OVPMD_STREAM_SEEK_END  End of the stream.

Member Function Documentation

HRESULT IOvPmdStream::Clone [in, out] IOvPmdStream **  stream  ) 
 
Semantics:
Creates a new stream object that references the same bytes as the original stream, but provides a separate seek pointer to those bytes.
Parameters:
stream  - Returned IOvPmdStream interface pointer to the new stream object.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::Commit [in] long  commitFlags  ) 
 
Semantics:
Ensures that any changes made to a stream object that is open in transacted mode are reflected in the parent storage object.
Parameters:
commitFlags  - One of the OVPMD_STGC values.
Possible errors:
Since:
6.x
HRESULT IOvPmdStream::CopyTo [in, unique] IOvPmdStream destStream,
[in] long  bytesToCopy,
[out] long *  bytesRead,
[out] long *  bytesWritten
 
Semantics:
Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
Note:
Use CopyToEx(...) in scripts. This method does not work in scripts.
Parameters:
destStream  - Target stream object.
bytesToCopy  - Amount of bytes to copy from the current stream.
bytesRead  - Amount of bytes actually read from the current stream.
bytesWritten  - Amount of bytes actually written to the target stream.
Possible errors:
NULL pointer passed
Stream bounds crossed
Since:
6.x
HRESULT IOvPmdStream::CopyToEx [in, unique] IOvPmdStream pDestStream,
[in] long  lBytesToCopy,
[out, retval] long *  plBytesWritten
 

Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.

Parameters:
pDestStream  - Target stream object.
lBytesToCopy  - Amount of bytes to copy from the current stream.
plBytesWritten  - Amount of bytes actually written to the target stream.
Possible errors:
NULL pointer passed
Stream bounds crossed
Since:
6.x
HRESULT IOvPmdStream::Read [out] VARIANT *  pv,
[in] long  cb,
[out] long *  pcbRead
 
Semantics:
Reads a custom VARIANT value from the stream.
Note:
This method does not work for scripts because it has two out parameters. Use IOvPmdStream2::GetByteArray() or IOvPmdStream2::GetString() instead of this method to read the entire data stream into memory.
Parameters:
pv  - Pointer to the buffer into which the stream is read.
cb  - Specifies the number of bytes to read.
pcbRead  - Pointer to the location that contains the actual number of bytes read
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadBoolean [out, retval] VARIANT_BOOL *  v  ) 
 
Semantics:
Reads a Boolean value from the stream.
Parameters:
v  - Returned VARIANT_BOOL value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadByte [out, retval] BYTE *  v  ) 
 
Semantics:
Reads a byte value from the stream.
Parameters:
v  - Returned BYTE value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadCurrency [out, retval] CURRENCY *  v  ) 
 
Semantics:
Reads a currency value from the stream.
Parameters:
v  - Returned CURRENCY value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadDate [out, retval] DATE *  v  ) 
 
Semantics:
Reads a date value from the stream.
Parameters:
v  - Returned DATE value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadDouble [out, retval] double *  v  ) 
 
Semantics:
Reads a double value from the stream.
Parameters:
v  - Returned double value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadFloat [out, retval] float *  v  ) 
 
Semantics:
Reads a float value from the stream.
Parameters:
v  - Returned float value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadInt [out, retval] short *  v  ) 
 
Semantics:
Reads an integer value from the stream.
Parameters:
v  - Returned integer value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadLong [out, retval] long *  v  ) 
 
Semantics:
Reads a long value from the stream.
Parameters:
v  - Returned long value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadString [out, retval] BSTR *  v  ) 
 
Semantics:
Reads a BSTR string from the stream.
Parameters:
v  - Returned BSTR value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::ReadVariant [out, retval] VARIANT *  v  ) 
 
Semantics:
Reads a VARIANT value from the stream.
Note:
This method checks the type of value being read from the stream. No other read methods do any type checking. The developer is responsible for it! For each "Write" method in your program, a corresponding "Read" method is required to extract the data again.
Parameters:
v  - Returned VARIANT value.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::Revert  ) 
 
Semantics:
Discards all changes that have been made to a transacted stream since the last IOvPmdStream::Commit() call.
Possible errors:
Since:
6.x
HRESULT IOvPmdStream::Seek [in] long  offset,
[in] long  origin,
[out] long *  newPosition
 
Semantics:
Changes the seek pointer to a new location relative to the beginning of the stream, the end of the stream, or the current seek pointer.
Note:
Use SeekEx(...) in scripts. This method may not work in scripts.
Parameters:
offset  - Pointer position offset in bytes.
origin  - One of the OVPMD_STREAM_SEEK values.
newPosition  - New pointer position.
Possible errors:
Stream bounds crossed
Since:
6.x
HRESULT IOvPmdStream::SeekEx [in] long  offset,
[in] long  origin,
[out, retval] long *  newPosition
 
Semantics:
Changes the seek pointer to a new location relative to the beginning of the stream, the end of the stream, or the current seek pointer.
Parameters:
offset  - Pointer position offset in bytes.
origin  - One of the OVPMD_STREAM_SEEK values.
newPosition  - New pointer position.
Possible errors:
Stream bounds crossed
Since:
6.x
HRESULT IOvPmdStream::SetSize [in] long  newSize  ) 
 
Semantics:
Changes the size of the stream object, and fills it with nulls.
Parameters:
newSize  - New stream object size in bytes.
Possible errors:
Since:
6.x
HRESULT IOvPmdStream::Write [in] VARIANT *  v,
[in] long  l,
[out, retval] long *  al
 
Semantics:
Writes a custom value to the stream.
Parameters:
v  - VARIANT pointer to the value to be written.
l  - Size of the value in bytes.
al  - Actual amount of bytes written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteBoolean [in] VARIANT_BOOL  v  ) 
 
Semantics:
Writes a Boolean value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteByte [in] BYTE  v  ) 
 
Semantics:
Writes a byte value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteCurrency [in] CURRENCY  v  ) 
 
Semantics:
Writes a currency value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteDate [in] DATE  v  ) 
 
Semantics:
Writes a date value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteDouble [in] double  v  ) 
 
Semantics:
Writes a double value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteFloat [in] float  v  ) 
 
Semantics:
Writes a float value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteInt [in] short  v  ) 
 
Semantics:
Writes an integer value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteLong [in] long  v  ) 
 
Semantics:
Writes a long value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteString [in] BSTR  v  ) 
 
Semantics:
Writes a string to the stream.
Parameters:
v  - BSTR string to be written.
Possible errors:
NULL pointer passed
Since:
6.x
HRESULT IOvPmdStream::WriteVariant [in] VARIANT  v  ) 
 
Semantics:
Writes a VARIANT value to the stream.
Parameters:
v  - Value to be written.
Possible errors:
NULL pointer passed
Since:
6.x