Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function changes the key that encrypted data associates with a user.

Syntax

BOOL SetUserData( 
  LPBYTE 
lpbUserData, 
  DWORD 
dwDataSize 
);

Parameters

lpbUserData

[in] Buffer of user-specific encrypted data, such as a password.

dwDataSize

[in] Size of the user encrypted data.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

This function is accessible only to privileged applications.

The specified data is passed to the security subsystem for encryption and decryption. If no user is currently logged on, the call fails, and GetLastErrorreturns ERROR_FILE_NOT_FOUND.

Requirements

Header pwinreg.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also