ProtoSpec access routines. More...

List of all members.

Public Member Functions

HRESULT Load ([in] LPCOLESTR pszXmlFile,[in] LPCOLESTR pszBinFile,[in] ULONG ulProductCode,[in] BOOL bShowHidden)
HRESULT Unload ()
HRESULT InstanceToID ([in] ULONG ulInstanceID,[out] USHORT *pusID)
HRESULT IsRootID ([in] ULONG ulID)
HRESULT IsLlcID ([in] ULONG ulID)
HRESULT GetParent ([in] ULONG ulID,[out, retval] ULONG *pulParent)
HRESULT GetHierarchicalName ([in] ULONG ulID,[out, retval] BSTR *pbstrName)
HRESULT GetShortName ([in] ULONG ulID,[out, retval] BSTR *pbstrName)
HRESULT GetLongName ([in] ULONG ulID,[out, retval] BSTR *pbstrName)
HRESULT GetDescription ([in] ULONG ulID,[out, retval] BSTR *pbstrDescription)
HRESULT GetColor ([in] ULONG ulID,[out, retval] OLE_COLOR *pColor)
HRESULT GetDepth ([in] ULONG ulID,[out, retval] ULONG *pulDepth)
HRESULT GetPacketProtoSpec ([in] enum TMediaType mt,[in] enum TMediaSubType mst,[in, size_is(ulDataBytes)] BYTE *pData,[in] ULONG ulDataBytes,[out] ULONG *pulID)
HRESULT IsDescendentOf ([in] ULONG ulID,[in, size_is(lCount)] ULONG pParentArray[],[in] LONG lCount,[out] ULONG *pulMatchInstanceID,[out] LONG *plMatchIndex)
HRESULT Find ([in] BSTR bstrName,[out] ULONG *pulID)
HRESULT GetHeaderLayer ([in] enum TMediaType mt,[in] enum TMediaSubType mst,[in, size_is(ulDataBytes)] BYTE *pData,[in] ULONG ulDataBytes,[in] ULONG ulPSpecInstID,[out] ULONG *pulSourceID,[out] BYTE **ppData)
HRESULT GetDataLayer ([in] enum TMediaType mt,[in] enum TMediaSubType mst,[in, size_is(ulDataBytes)] BYTE *pData,[in] ULONG ulDataBytes,[in] ULONG ulID,[out] ULONG *pulSourceID,[out] BYTE **ppData)
HRESULT BuildParentArray ([in] ULONG ulID,[in, out] ULONG *pParentArray,[in, out] ULONG *pulMaxCount)

Detailed Description

This interface is implemented by the Omnipeek console and Omnił Engine and provides access to ProtoSpecs.

Member Function Documentation

HRESULT IProtoSpecs::BuildParentArray [in] ULONG  ulID,
[in, out] ULONG *  pParentArray,
[in, out] ULONG *  pulMaxCount
 

Build an array of parents for a ProtoSpec instance ID.

Parameters:
ulID ProtoSpec instance ID.
pParentArray Pointer to an array of parent instance IDs.
pulMaxCount On input, pointer to a variable that specifies how many parents can be returned. On output, the variable receives the actual number of parent instance IDs returned.
Return values:
S_OK Success
E_FAIL Error
E_OUTOFMEMORY The value for max count is not large enough to hold the number of parents.
E_POINTER One of the pointers is invalid.
Remarks:
None
HRESULT IProtoSpecs::Find [in] BSTR  bstrName,
[out] ULONG *  pulID
 

Find a ProtoSpec ID by hierarchical name.

Parameters:
bstrName A BSTR containing the name of the ProtoSpec.
pulID Pointer to a variable that receives the ProtoSpec ID.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetColor [in] ULONG  ulID,
[out, retval] OLE_COLOR *  pColor
 

Get the color assigned to the protocol corresponding to a ProtoSpec instance ID (see OleTranslateColor).

Parameters:
ulID The ProtoSpec instance ID.
pColor Pointer to a variable that receives the color assigned to the ProtoSpec.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetDataLayer [in] enum TMediaType  mt,
[in] enum TMediaSubType  mst,
[in, size_is(ulDataBytes)] BYTE *  pData,
[in] ULONG  ulDataBytes,
[in] ULONG  ulID,
[out] ULONG *  pulSourceID,
[out] BYTE **  ppData
 

Get the data layer for a protocol in a packet.

Parameters:
mt The media type.
mst The media sub type.
pData Pointer to the packet.
ulDataBytes The number of bytes in the packet.
ulID The ProtoSpec instance ID for the protocol.
pulSourceID Pointer to a variable that receives the ProtoSpec instance ID corresponding to the data layer.
ppData Pointer to a variable that receives a pointer to the location of the data layer in the packet.
Return values:
S_OK Success
E_FAIL Error
E_POINTER One of the pointers is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetDepth [in] ULONG  ulID,
[out, retval] ULONG *  pulDepth
 

Get the depth of the instance ID in the ProtoSpec.

Parameters:
ulID The ProtoSpec instance ID.
pulDepth Pointer to a variable that receives the depth of the ProtoSpec.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetDescription [in] ULONG  ulID,
[out, retval] BSTR *  pbstrDescription
 

Get the description of a ProtoSpec.

Parameters:
ulID The ProtoSpec instance ID.
pbstrDescription Pointer to a BSTR that holds the description of the ProtoSpec.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetHeaderLayer [in] enum TMediaType  mt,
[in] enum TMediaSubType  mst,
[in, size_is(ulDataBytes)] BYTE *  pData,
[in] ULONG  ulDataBytes,
[in] ULONG  ulPSpecInstID,
[out] ULONG *  pulSourceID,
[out] BYTE **  ppData
 

Get the header layer for a protocol in a packet.

Parameters:
mt The media type.
mst The media sub type.
pData Pointer to the packet.
ulDataBytes The number of bytes in the packet.
ulPSpecInstID The ProtoSpec instance ID for the protocol.
pulSourceID Pointer to a variable that receives the ProtoSpec instance ID corresponding to the header layer.
ppData Pointer to a variable that receives a pointer to the location of the header layer in the packet.
Return values:
S_OK Success
E_FAIL Error
E_POINTER One of the pointers is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetHierarchicalName [in] ULONG  ulID,
[out, retval] BSTR *  pbstrName
 

Get the hierarchical name of the protocol corresponding to the ProtoSpec.

Parameters:
ulID The ProtoSpec instance ID.
pbstrName Pointer to a BSTR that holds the hierarchical name of the ProtoSpec.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetLongName [in] ULONG  ulID,
[out, retval] BSTR *  pbstrName
 

Get the long name of the protocol corresponding to a ProtoSpec.

Parameters:
ulID The ProtoSpec instance ID.
pbstrName Pointer to a BSTR that holds the long name of the ProtoSpec.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetPacketProtoSpec [in] enum TMediaType  mt,
[in] enum TMediaSubType  mst,
[in, size_is(ulDataBytes)] BYTE *  pData,
[in] ULONG  ulDataBytes,
[out] ULONG *  pulID
 

Calculate the ProtoSpec instance ID for the highest layer of a packet.

Parameters:
mt The media type.
mst The media sub type.
pData Pointer to the packet.
ulDataBytes The number of bytes in the packet.
pulID Pointer to a variable that receives the ProtoSpec instance ID.
Return values:
S_OK Success
E_FAIL Error
E_POINTER One of the pointers is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetParent [in] ULONG  ulID,
[out, retval] ULONG *  pulParent
 

Get the parent instance ID for a ProtoSpec.

Parameters:
ulID The ProtoSpec instance ID.
pulParent Pointer to a variable that receives the ProtoSpec instance ID of the parent.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::GetShortName [in] ULONG  ulID,
[out, retval] BSTR *  pbstrName
 

Get the short name of the protocol corresponding to a ProtoSpec.

Parameters:
ulID The ProtoSpec instance ID.
pbstrName Pointer to a BSTR that holds the short name of the ProtoSpec.
Return values:
S_OK Success
E_FAIL Error
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::InstanceToID [in] ULONG  ulInstanceID,
[out] USHORT *  pusID
 

Convert a ProtoSpec instance ID to a ProtoSpec ID.

Parameters:
ulInstanceID The ProtoSpec instance ID.
pusID Pointer to a variable that receives the ProtoSpec ID.
Return values:
S_OK Success
E_POINTER The pointer is invalid.
Remarks:
None
HRESULT IProtoSpecs::IsDescendentOf [in] ULONG  ulID,
[in, size_is(lCount)] ULONG  pParentArray[],
[in] LONG  lCount,
[out] ULONG *  pulMatchInstanceID,
[out] LONG *  plMatchIndex
 

Check if a protocol is a subprotocol of a number of possible parent protocols.

Parameters:
ulID The ProtoSpec instance ID of the protocol.
pParentArray An array of ProtoSpec instance IDs for the parent protocols.
lCount The number of parent protocols.
pulMatchInstanceID Pointer to a variable that receives the ProtoSpec instance ID if the protocol is a subprotocol of one of the parent protocols. This parameter may be NULL if this information is not needed.
plMatchIndex Pointer to a variable the receives the index of the parent protocol if the protocol is a subprotocol of one of the parent protocols. This parameter may be NULL if this information is not needed.
Return values:
S_OK The protocol is a subprotocol of one of the specified parents.
S_FALSE The protocol is not a subprotocol of any of the specified parents.
E_FAIL Error
E_INVALIDARG The lCount parameter is invalid.
E_POINTER One of the pointers is invalid.
Remarks:
None
HRESULT IProtoSpecs::IsLlcID [in] ULONG  ulID  ) 
 

Is this ProtoSpec a LLC ID?

Parameters:
ulID The ProtoSpec instance ID.
Return values:
S_OK This is a LLC ID.
S_FALSE This is not a LLC ID.
Remarks:
None
HRESULT IProtoSpecs::IsRootID [in] ULONG  ulID  ) 
 

Is this ProtoSpec a "root" ID?

Parameters:
ulID The ProtoSpec instance ID.
Return values:
S_OK This is a "root" ID.
S_FALSE This is not a "root" ID.
Remarks:
None
HRESULT IProtoSpecs::Load [in] LPCOLESTR  pszXmlFile,
[in] LPCOLESTR  pszBinFile,
[in] ULONG  ulProductCode,
[in] BOOL  bShowHidden
 

Load ProtoSpecs.

Parameters:
pszXmlFile Pointer to the name of the ProtoSpec XML file. This parameter may be NULL to force the loading of the ProtoSpec binary file.
pszBinFile Pointer to the name of the ProtoSpec binary file. This parameter may be NULL to force the loading of the ProtoSpec XML file.
ulProductCode Do not load the ProtoSpecs related to this product. If 0, load the ProtoSpecs for all products.
bShowHidden Reserved, must be TRUE.
Return values:
S_OK Success
E_FAIL Error
Remarks:
If the ProtoSpec XML file exists and if the ProtoSpec binary file exists, and if both names are passed to this method, the method loads the "newer" file. The binary file is generated if it does not exist when this method is called.
HRESULT IProtoSpecs::Unload  ) 
 

Unload ProtoSpecs.

Return values:
S_OK Success
E_FAIL Error
Remarks:
None