Memory Allocation

Several TSPI functions return large amounts of information. Applications are responsible for allocating memory for this information; the service provider simply fills in the data. Some of these data structure members are filled in by tapi32.dll, and others are filled in by the service provider. The function descriptions in this section explain the division of responsibility between tapi32.dll and the service provider. The service provider must preserve the values in fields for which tapi32.dll is responsible. In any case, the service provider must fill in the fields it "owns" before reporting the operation complete. Note that, for functions that complete asynchronously, the filling of the data structure may be done synchronously or asynchronously, which in any case must be completed before the LINE_REPLY message is sent. When passed to the service provider from TAPI, the structure is filled with zeros, and then the TAPI fields are added, so it is not necessary for the service provider to explicitly write zero values to any field.