Article View: borland.public.cppbuilder.nativeapi
Article #749Please Pb with folder with Vista
From: patrickartaud
Date: Thu, 24 Jan 2008 16:20
Date: Thu, 24 Jan 2008 16:20
38 lines
2598 bytes
2598 bytes
Hello
I have created an application running with XP but now I must change the code
because my application creates folders and subfolders with files IFor the
user for the exemple it is me "Patrick"
I use this code :
/////////////////////////////////////////////////////////////////////////////////
LPITEMIDLIST List=NULL;
AnsiString Full,Fi,FN;
char Path[MAX_PATH+1]={0};
if(!SHGetSpecialFolderLocation(0,CSIDL_APPDATA,&List))
{
if(SHGetPathFromIDList(List,Path))
{Fi=Path;
FN=societe;
Full=Fi+FN;
strcpy(Path,Full.c_str());
CreateDir(Full);
}
}
ChVista=Full
/////////////////////////////////////////////////////////////////
It is ok I have
Document and setting\Patrick\Application Data in ChVista
But when I launch my application it put the folders and subfolders in
Document and setting\Patrick\Application Data\Roaming
And my application dont find the folders.
I have look on halp for LPITEMIDLIST and SHGetSpecialFolderLocation and on
the net I have past long time to find and try to understand but nothing, I
don't arrive to do it correctly.
If somebody can help me or somebody have had the same problem to modify the
code help me please
I don't understand why it add this subfolder Roaming because in ChVista it
stop at application data or it is a wrong CSIDL?but I have look.
I don't understand how to do.
I thank you very very much for your help in advance
Patrick
PS:Excuse my English
Technical Details
Message-ID:
<4798bade@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7ff0773a78f53a87,start X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "patrickartaud" <patrickartaud@aidedecision.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Please Pb with folder with Vista Date: Thu, 24 Jan 2008 17:20:33 +0100 Lines: 39 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 NNTP-Posting-Host: 82.228.58.174 Message-ID: <4798bade@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1201191646 82.228.58.174 (24 Jan 2008 08:20:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail