Article View: cn.bbs.comp.lang.visual-basic
Article #20598Re: ������λ�õ�ǰ�û�����Ŀ¼��λ��
From: ������
Date: Wed, 13 Aug 2003 10:10
Date: Wed, 13 Aug 2003 10:10
86 lines
3431 bytes
3431 bytes
�� �� Roaring (���г�˫) �Ĵ������ᵽ: �� : ͨ����c:\document and settings\username\ �μ�msdn GetUserProfileDirectory The GetUserProfileDirectory function retrieves the path to the root directory of the specified user's profile. BOOL GetUserProfileDirectory( HANDLE hToken, LPTSTR lpProfileDir, LPDWORD lpcchSize ); Parameters hToken [in] Token for the user, which is returned by the LogonUser, CreateRestrictedToken , DuplicateToken, OpenProcessToken, or OpenThreadToken function. The token must have TOKEN_QUERY access. For more information, see Access Rights for Access-Token Objects. lpProfileDir [out] Pointer to the buffer that receives the path to the specified user' s profile directory. lpcchSize [in, out] Specifies the size of the lpProfilesDir buffer, in TCHARs. Return Values If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information , call GetLastError. Remarks If the buffer specified by the lpProfilesDir parameter is not large enough , the function fails, and the lpcchSize parameter receives the necessary buffer size, including the terminating null character. The following is an example of the path returned by the GetUserProfileDirectory function: C:\Documents and Settings\Joe To obtain the location of subdirectories of this directory, use the SHGetFolderPath function. Requirements Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0. Server: Included in Windows Server 2003, Windows 2000 Server, Windows NT Server 4.0. Unicode: Implemented as Unicode and ANSI versions. Header: Declared in Userenv.h. Library: Use Userenv.lib. See Also User Profiles Overview, User Profiles Functions, GetAllUsersProfileDirectory , GetDefaultUserProfileDirectory, GetProfilesDirectory Platform SDK Release: February 2003 What did you think of this topic? Order a Platform SDK CD Requirements Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0. Server: Included in Windows Server 2003, Windows 2000 Server, Windows NT Server 4.0. Unicode: Implemented as Unicode and ANSI versions. Header: Declared in Userenv.h. Library: Use Userenv.lib. See Also User Profiles Overview, User Profiles Functions, GetAllUsersProfileDirectory , GetDefaultUserProfileDirectory, GetProfilesDirectory -- [m[1;37m�� ��Դ:��BBS ˮľ�廪վ smth.org��[FROM: 166.111.176.238][m
Technical Details
Message-ID:
<000000$7WC@smth.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!SMTHShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB X-Google-Thread: 109fdd,6141acc35934a9b5,start X-Google-Attributes: gid109fdd,public X-Google-ArrivalTime: 2003-08-13 03:15:12 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!SMTH From: henryl@smth.org (������) Newsgroups: cn.bbs.comp.lang.visual-basic Subject: Re: ������λ�õ�ǰ�û�����Ŀ¼��λ�� Date: 13 Aug 2003 10:10:58 GMT Organization: BBS ˮľ�廪վ Message-ID: <000000$7WC@smth.org> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: VisualBasic/q/M.1060769439.n0 Lines: 86