Get user picture

后端 未结 2 1540
余生分开走
余生分开走 2021-02-06 12:47

OS: Win7x64 (2008,2008r2). Lang: Delphi Xe2.

\"enter

2条回答
  •  后悔当初
    2021-02-06 13:14

    According to MSDN:

    In Windows 7 or later, each user profile has an associated image presented as a user tile. These tiles appear to users on the User Accounts Control Panel item and its Manage Accounts subpage.. The image files for the default Guest and default User accounts also appear here if you have Administrator access rights.

    ....

    The user's tile image is stored as C:\Users\\Local\Temp folder as .bmp. Any slash characters () are converted to plus sign characters (+). For example, DOMAIN\user is converted to DOMAIN+user.

    I could not find an API to obtain the image and since the official documentation is calling out this implementation detail I think that means that you are safe to rely on it. That is I think this is a supported way to obtain the tile image.

提交回复
热议问题