Compartilhar via


2.2.1.10 CERTTRANSDBRESULTCOLUMN

The CERTTRANSDBRESULTCOLUMN structure is encoded within a CERTTRANSBLOB structure. The CERTTRANSDBRESULTCOLUMN structure is used by the server to return the result of a CA database query that is done by the client (upon the client's query via invocation of the OpenView or EnumView method of the ICertAdminD interface).

The OpenView and EnumView methods return data in the form of a CERTTRANSBLOB structure whose pb member points to an array of one or more CERTTRANSDBRESULTROW structures. Each CERTTRANSDBRESULTROW structure contains one or more CERTTRANSDBRESULTCOLUMN structures.

The CERTTRANSDBRESULTCOLUMN structure contains data for a specific column in a specific row.

 typedef struct _CERTTRANSDBRESULTCOLUMN {
   DWORD Type;
   DWORD Index;
   ULONG obValue;
   DWORD cbValue;
 } CERTTRANSDBRESULTCOLUMN;

Type: This field describes the column. It consists of two WORDs, a high WORD and a low WORD, which are used separately.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Column Flags

Column Type

Column Flags: This is the high WORD of the Type field. It is a 16-bit field where only bit 15 is used, as shown in the following bit diagram.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

I

      I: If set to 1, it indicates that the column is indexed for lookup purposes.

      All other bits are reserved and MUST be set to 0.

Column Type: This is the low WORD of the Type field. It is divided into two bytes:

  • The high byte of the low WORD MUST be set to 0, and MUST be ignored by the server on receipt.

  • The low byte of the low WORD MUST specify the value type for the column that is associated with a specific table by using one of the following values.

    Value

    Meaning

    0x01

    The Column type is a signed integer.

    0x02

    The Column type is a date.

    0x03

    The Column type is binary data.

    0x04

    The Column type is a string.

Index: An unsigned integer value that specifies the identifier for the column in the relevant table.

obValue: An unsigned integer that contains the offset from the beginning of the corresponding CERTTRANSDBRESULTROW structure to where the value for this column can be found. The length of the value is specified in the cbValue field. The offset MUST be DWORD aligned.

cbValue: An unsigned integer value that specifies the length, in bytes, of the value for the specific column.