CreateIdentityHandle

Creates a new identity handle.

HRESULT CreateIdentityHandle (
       IN OPTIONAL LPCWSTR wszMemberName,
       IN DWORD dwflags,
       OUT PassportIdentityHandle *pihIdentity
       );

wszMemberName

Optional. The sign-in name of the identity that is created. This may be NULL initially and set later with the SetIdentityProperty method.

dwflags

Identity creation flags. This value should be IDENTITY_FLAG.IDENTITY_SHARE_ALL.

pihIdentity

A pointer to the location of the identity handle.

Return Code

Description

E_POINTER

The supplied identity handle pointer is NULL.

S_OK

The identity handle was successfully created.

The handle that you create is passed as a parameter to several of the IDCRL methods. The PassportIdentityHandle object is used by IDCRL to represent a user account in the logon service, including the sign-in name of the account and any authentication or service tickets that are associated with the account. You can set the sign-in name for the identity when you create the handle or you can set it later by using the SetIdentityProperty method.

Show: