Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

2.3.7 STAT

The STAT structure is used to specify the state of a table and location information that applies to that table. It appears as both an input parameter and an output parameter in many Name Service Provider Interface (NSPI) methods.

typedef struct {
  DWORD SortType;
  DWORD ContainerID;
  DWORD CurrentRec;
  long Delta;
  DWORD NumPos;
  DWORD TotalRecs;
  DWORD CodePage;
  DWORD TemplateLocale;
  DWORD SortLocale;
} STAT;

SortType: This field contains a DWORD representing a sort order. The client sets this field to specify the sort type of this table. Possible values are specified in Table Sort Orders (section 2.2.10). The server MUST NOT modify this field.

ContainerID: This field contains a MId. The client sets this field to specify the MId of the address book container that this STAT represents. The client obtains these MIds from the server's address book hierarchy table. The server MUST NOT modify this field in any NSPI method except NspiGetMatches.

CurrentRec: This field contains a MId. The client sets this field to specify a beginning position in the table for the start of an NSPI method. The server sets this field to report the end position in the table after processing an NSPI method.

Delta: This field contains a long value. The client sets this field to specify an offset from the beginning position in the table for the start of an NSPI method. If the NSPI method returns a success value, the server MUST set this field to 0.

NumPos: This field contains a DWORD value specifying a position in the table. The client sets this field to specify a fractional position for the beginning position in the table for the start of an NSPI method (section 3.1.1.4.2). The server sets this field to specify the approximate fractional position at the end of an NSPI method. This value is a zero index; the first element in a table has the numeric position 0. Although the protocol places no boundary or requirements on the accuracy of the approximation the server reports, it is recommended that implementations maximize the accuracy of the approximation to improve usability of the NSPI server for clients.

TotalRecs: This field contains a DWORD specifying the number of rows in the table. The client sets this field to specify a fractional position for the beginning position in the table for the start of an NSPI method (section 3.1.1.4.2). The server sets this field to specify the total number of rows in the table. Unlike the NumPos field, the server MUST report this number accurately; an approximation is insufficient.

CodePage: This field contains a DWORD value representing a codepage. The client sets this field to specify the codepage the client uses for non-Unicode strings. The server MUST use this value during string handling (section 3.1.1.2). The server MUST NOT modify this field.

TemplateLocale: This field contains a DWORD value representing a language code identifier (LCID). The client sets this field to specify the LCID associated with the template the client wishes the server to return. The server MUST NOT modify this field.

SortLocale: This field contains a DWORD value representing an LCID. The client sets this field to specify the LCID that it wishes the server to use when sorting any strings. The server MUST use this value during sorting (section 3.1.1.2). The server MUST NOT modify this field.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.