ICommandTree::FindErrorNodes

[This is preliminary documentation and subject to change.]

Walks a command tree and returns an array of nodes with errors in them.

HRESULT FindErrorNodes(
  const DBCOMMANDTREE * pRoot, 
  ULONG * pcErrorNodes, 
  DBCOMMANDTREE ** prgErrorNodes 
);
 

Parameters

pRoot
[in] Pointer to the root of the command tree.
pcErrorNodes
[out] Pointer to memory in which to return the number of nodes containing errors.
prgErrorNodes
[out] Pointer to memory in which to return an array of pointers to nodes that have errors in them. The command object allocates memory for this array and returns the address to this memory; the consumer releases this memory with IMalloc::Free when it no longer needs the array. If *pcErrorNodes is 0 on output, the provider does not allocate any memory and ensures that *prgErrorNodes is a null pointer on output.

Return Value

S_OK
The method succeeded.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
pRoots, pcErrorNodes, or prgErrorNodes was a null pointer.
E_OUTOFMEMORY
The provider was unable to allocate sufficient memory in which to return the array of pointers to nodes containing errors.