IEnumCERTVIEWCOLUMN::GetMaxLength

[This is preliminary documentation and subject to change.]

The GetMaxLength method retrieves the maximum allowable length for the column data.

[VB] Long GetMaxLength();
 
[JAVA] int GetMaxLength();
 
[C++] HRESULT GetMaxLength(
  LONG *pMaxLength  // out
);
 

Parameters

[C++] pMaxLength
Points to a LONG value that will contain the maximum allowable length for the column data. This function will fail if pMaxLength is NULL.

Return Values

[VB][JAVA] The return value is the maximum allowable length for the column data.

[C++] The return value is an HRESULT. A value of S_OK indicates success. Upon successful completion of this function, pMaxLength will point to the variable containing the maximum allowable length for the column data.

Remarks

This function is used to determine the maximum allowable data length for the column currently being referenced by the IEnumCERTVIEWCOLUMN object.

If the IEnumCERTVIEWCOLUMN object is not referencing a valid column, GetMaxLength will fail. Use the IEnumCERTVIEWCOLUMN Next method to reference a valid column.

Example

// pEnumCol is previously instantiated IEnumCERTVIEWColumn object
HRESULT    hr;
LONG       nLength;

// determine database length
hr = pEnumCol->GetMaxLength( &nLength );
if ( S_OK ==  hr )
    printf("max length is %d\n", nLength ); 

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in certview.h.
  Import Library: Use certidl.lib.

See Also

IEnumCERTVIEWCOLUMN::IsIndexed