using System; using System.Runtime.InteropServices; namespace Vanara.PInvoke { public static partial class Shell32 { /// Exposes a method which is called when the picture that represents a user account is changed. /// /// /// Applications that want to notify users through this interface can add their class identifier (CLSID) strings as values under /// this key: /// /// SOFTWAREMicrosoftWindowsCurrentVersionUserPictureChange /// The values under this key are enumerated to create this callback object. /// // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl/nn-shobjidl-iuseraccountchangecallback [PInvokeData("shobjidl.h", MSDNShortId = "NN:shobjidl.IUserAccountChangeCallback")] [ComImport, Guid("a561e69a-b4b8-4113-91a5-64c6bcca3430"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IUserAccountChangeCallback { /// Called to send notifications when the picture that represents a user account is changed. /// /// Type: LPCWSTR /// Pointer to a string that contains the user name. Set this parameter to NULL to specify the current user. /// /// /// Type: HRESULT /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. /// /// /// /// When the picture that represents a user account changes, the callback object notifies all applications that are registered /// under this registry subkey: /// /// SOFTWAREMicrosoftWindowsCurrentVersionUserPictureChange /// // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl/nf-shobjidl-iuseraccountchangecallback-onpicturechange HRESULT // OnPictureChange( LPCWSTR pszUserName ); [PreserveSig] HRESULT OnPictureChange([MarshalAs(UnmanagedType.LPWStr)] string pszUserName); } } }