SpCreateObjectFromSubToken
Other versions of this page are also available for the following:
8/28/2008
This function creates an object from a subkey of the data key belonging to an object token.
Syntax
HRESULT SpCreateObjectFromSubToken(
ISpObjectToken* pToken,
const WCHAR* pszSubKeyName,
T** ppObject,
IUnknown pUnkOuter = NULL,
DWORD* dwClsCtxt = CLSCTX_ALL
);
Parameters
- pToken
[in] Pointer to an object implementing ISpObjectToken that contains the information associated with the object being created.
- pszSubKeyName
[in] Pointer to a null-terminated string specifying the name of the subkey of the data key corresponding to the token.
- ppObject
[out, iid_is(riid)] Address of a pointer to the interface indicated by riid, or NULL if the interface is not supported.
- 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 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 Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
FAILED(hr) |
Appropriate error message. |
Requirements
Header | sphelper.h |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |