Share via


ISpDataKey::CreateKey (Windows Embedded CE 6.0)

1/6/2010

This method creates a subkey and returns a new object that supports ISpDataKey for the specified subkey. If the key already exists, the method opens the existing key instead of overwriting it.

Syntax

HRESULT CreateKey(
  const WCHAR* pszSubKeyName, 
  ISpDataKey** ppSubKey
);

Parameters

  • pszSubKeyName
    [in] Pointer to a null-terminated string specifying the name of the key to create.
  • ppSubKey
    [out] Address of a pointer to an ISpDataKey interface for the subkey.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_INVALIDARG

Either pszSubKeyName or ppKey is invalid or bad.

FAILED(hr)

Appropriate error message.

Requirements

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpDataKey
SAPI Interfaces