SpCreateObjectFromToken
This function creates an object from an object token.
HRESULT SpCreateObjectFromToken(
ISpObjectToken* pToken,
T** ppObject,
IUnknown* pUnkOuter = NULL,
DWORD dwClsCtxt = CLSCTX_ALL
);
Parameters
- pToken
[in] Pointer to an object implementing ISpObjectToken from which to create the object. - ppObject
[out] Address of a pointer to the object that is created. - pUnkOuter
[in] Optional pointer to IUnknown, used for creating aggregate objects. pUnkOuter is the data for the object. If not specified, the value defaults to NULL. - dwClsCtxt
[in] Context in which the code that manages the newly created object will run. The following list shows the possible values. If a value is not specified, the parameter defaults to CLSCTX_ALL.- CLSCTX_ALL
- CLSCTX_INPROC_SERVER
- CLSCTX_INPROC_HANDLER
- CLSCTX_LOCAL_SERVER
- CLSCTX_REMOTE_SERVER
Return Values
The following table shows the possible return values.
| Value | Description |
|---|---|
| S_OK | Function completed successfully. |
| FAILED(hr) | Appropriate error message. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sphelper.h.
Link Library: Sapilib.lib.
See Also
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.