UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:certview.IEnumCERTVIEWCOLUMN.GetMaxLength |
IEnumCERTVIEWCOLUMN::GetMaxLength (certview.h) |
Retrieves the maximum allowable length, in bytes, for the column data. |
|
security\ienumcertviewcolumn_getmaxlength.htm |
security |
20cd5f5a-2e19-43ca-9b84-70e6dd1a4cad |
12/05/2018 |
GetMaxLength, GetMaxLength method [Security], GetMaxLength method [Security],IEnumCERTVIEWCOLUMN interface, IEnumCERTVIEWCOLUMN interface [Security],GetMaxLength method, IEnumCERTVIEWCOLUMN.GetMaxLength, IEnumCERTVIEWCOLUMN::GetMaxLength, _certsrv_ienumcertviewcolumn_getmaxlength, certview/IEnumCERTVIEWCOLUMN::GetMaxLength, security.ienumcertviewcolumn_getmaxlength |
certview.h |
Certsrv.h |
Windows |
None supported |
Windows Server 2003 [desktop apps only] |
Certidl.lib |
Certadm.dll |
Windows |
19H1 |
|
|
|
|
|
|
The GetMaxLength method retrieves the maximum allowable length, in bytes, for the column data.
If the column data's type is PROPTYPE_STRING, divide the number of bytes by sizeof(WCHAR)
to determine the maximum number of Unicode characters.
A pointer to a value of LONG type that contains the maximum allowable length for the column data. This function will fail if pMaxLength is NULL.
If the method succeeds, the method returns S_OK and the pMaxLength is set to the maximum allowable length for the column data.If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.
The return value is the maximum allowable length, in bytes, for the column data.This method is used to determine the maximum allowable data length for the column currently being referenced by the column-enumeration sequence.
If the column-enumeration sequence is not referencing a valid column, GetMaxLength will fail. Use one of the following methods to navigate through the enumeration:
- IEnumCERTVIEWCOLUMN::Reset: Moves to the beginning of the enumeration sequence.
- IEnumCERTVIEWCOLUMN::Next: Moves to the next column in the enumeration sequence.
- IEnumCERTVIEWCOLUMN::Skip: Skips a specified number of columns.
// 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);