Partager via


2.2.1.7 CERTTRANSDBCOLUMN

The CERTTRANSDBCOLUMN structure is encoded within a CERTTRANSBLOB structure. The CERTTRANSDBCOLUMN structure contains schema information about a particular database column that is associated with a specific table to the client. This associated table is invoked when the client queries the EnumViewColumn or EnumViewColumnTable method of the ICertAdminD and ICertAdminD2 interfaces, respectively.

 typedef struct _CERTTRANSDBCOLUMN {
   DWORD Type;
   DWORD Index;
   DWORD cbMax;
   ULONG obwszName;
   ULONG obwszDisplayName;
 } CERTTRANSDBCOLUMN;

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, this bit 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 server database.

cbMax: An unsigned integer value that specifies the maximum data size, in bytes, that this column can contain.

obwszName: An integer that contains the offset from the beginning of the byte array buffer that is pointed to by the pb member in the containing CERTTRANSBLOB structure, to where the string that contains the name of this column can be found. The string format is a null-terminated UNICODE string. The offset MUST be divisible by 4.

obwszDisplayName: An integer that contains the offset from the beginning of the byte array buffer that is pointed to by the pb member in the containing CERTTRANSBLOB structure, to where the string that contains the display name of this column can be found. The string format is a null-terminated UNICODE string. The offset MUST be divisible by 4.