Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7410067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:10:34+00:00 2026-05-29T06:10:34+00:00

OS: Win7x64 (2008,2008r2). Lang: Delphi Xe2. How to receive a full path (and file

  • 0

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

enter image description here
enter image description here

  1. How to receive a full path (and file name) to the image “user account picture”?
  2. How to set new picture?

Example on delphi plz.

Need:
…function GetCurrentUserPicture:string;

…function GetUserPicture(UserName:String):string;

…function SetUserNewPicture(UserName, ImageFileName:String):bool;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:10:35+00:00Added an answer on May 29, 2026 at 6:10 am

    There is an undocumented function in shell32.dll. On Windows XP its ordinal is 233, on Windows Vista and 7 its ordinal is 261.

    Its function prototype (from Airesoft) is:

    HRESULT WINAPI SHGetUserPicturePath (
        LPCWSTR pwszPicOrUserName, 
        DWORD sguppFlags, 
        LPWSTR pwszPicPath, 
        UINT picPathLen 
    )
    

    You can use this function to retrieve the path where the user picture is stored. Just pass the user name as pwszPicOrUserName, the buffer where you want to store the path to the picture as pwszPicPath and the size of the buffer in chars as picPathLen. You can set sguppFlags to 0 or to any of the other flags posssible.

    There is also a undocumented function which you can use in order to set the user picture of a user. Its ordinal is 234 on Windows XP, 262 on Windows Vista and Windows 7.

    Its function prototype (from Airesoft) is:

    HRESULT WINAPI SHSetUserPicturePath ( 
        LPWSTR pwszAcctName, 
        DWORD reserved, 
        LPCWSTR pwszPictureFile 
    )
    

    Pass the name of the user whose picture should be changed as pwszAcctName and the path to the picture you want to set as pwszPictureFile. Set reserved to 0. You have to initialize COM prior to calling this function.

    According to Microsoft you should not rely on undocumented function because they can be removed or changed with any patch which is installed on Windows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Win7 x64, Delphi Xe2 update2 Prompt: The new project, compile as x32, are applied
I have installed the latest node.js from here . I see the %Path% variables
Win7x64, DelphiXe. Has written the program, which registers the control panel applet (as here
I install the MS SQL Management Studio 2008, the installation was successfull but when
VC++ 2008, CLR Console App, being developed under win7 x64. I'm using .net with
EDIT: forgot to include my environment info... Win7x64, RubyInstaller Ruby v1.9.1-p378 EDIT 2: just
I search for a solution. We have Delphi 6 Prof on Win7/X64. When I
We bought Delphi XE to slowly upgrade from Delphi 6. Delphi 6 is well
I want to set up an environment on my PC (Win7x64) that I will
Using Delphi XE on Win7 x64, have Jedi Class Library ver. 3.45, and 7z.dll

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.