CreateTextServices function (textserv.h)
The CreateTextServices function creates an instance of a text services object. The text services object supports a variety of interfaces, including ITextServices and the Text Object Model (TOM).
HRESULT CreateTextServices( [in] IUnknown *punkOuter, [in] ITextHost *pITextHost, [out] IUnknown **ppUnk );
Pointer to the controlling IUnknown interface on the outer object if the text services object is being created as part of an aggregate object. This parameter can be NULL if the object is not part of an aggregate.
Pointer to your implementation of the ITextHost interface. This pointer must not be NULL.
Pointer to a variable that receives a pointer to the private IUnknown of the text services object. You can call QueryInterface on this pointer to retrieve ITextServices or ITextDocument interface pointers.
If the text services object was created successfully, the return value is S_OK.
If the function fails, one of the following COM error codes are returned. For more information on COM error codes, see Error Handling in COM.
||An invalid argument was passed in.|
||Memory for text services object could not be allocated.|
||The text services object could not be initialized.|
A text services object can be created as part of a standard COM-aggregated object. If it is, then callers should follow standard OLE32 rules for dealing with aggregated objects and caching interface pointers obtained through QueryInterface from the private IUnknown.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|