3.1.4 Memory Allocation
Several TSPI functions return large amounts of information to the TAPI DLL and the application calling the TAPI DLL. The TAPI DLL and the application share the responsibility to allocate memory for this information; the Service Provider simply fills in data. Some of the fields of these data structures are filled in by the TAPI DLL while others are filled in by the Service Provider. The function descriptions in this chapter include tables that describe the division of responsibility between the TAPI DLL and Service Provider. The Service Provider fills in the fields for which it is reponsibile. It must preserve the values in fields for which the TAPI DLL is responsible. In any case, the Service Provider must fill in the fields it "owns" before reporting the operation complete. Note that the filling of the data structure may be done synchronously or asynchronously. See the description in the beginning of Chapter 5 for an explanation on how the Service Provider must deal with variable size structures.