🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by patrickartaud Tue, 08 Apr 2008 10:07
Problem with Vista
#415
Author: patrickartaud
Date: Tue, 08 Apr 2008 10:07
32 lines
2231 bytes
Hello,
I have this code to run my application with Vista:
//----------------------------VISTA-------------------------
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=IncludeTrailingBackslash(Path)+FN;
           //     strcpy(Path,Full.c_str());
               ForceDirectories(Full);ChVista=Full;
                }
        }else{SHGetPathFromIDList(List,Path);
                ChVista=Path+AnsiString(societe);}
//----------------------------------------------------------------
My application start but when my application tries to create � directori 
with .db files I have this message:
"Can't init networrk.
Inexisting directory or file
file: C:\PDOXUSRS.NET
Permission not accepted
Directory C:\ "
I don't understand because I'm Administrator and at the stat of my 
application it creates directories and subdirectories with files very well.
If you have any id�a please, because I would my application can read and 
write in "Application data/Roamind/MyAppDir
I thank you very well and excuse my English
Regards
Patrick 
Re: Problem with Vista
#416
Author: Remy Lebeau (TeamB)
Date: Tue, 08 Apr 2008 16:40
15 lines
1366 bytes
"patrickartaud" <patrickartaud@aidedecision.com> wrote in message 
news:47fb4400$1@newsgroups.borland.com...

> if(!SHGetSpecialFolderLocation(0,CSIDL_APPDATA,&List))
>        {
<snip>
>        }else{SHGetPathFromIDList(List,Path);
>                ChVista=Path+AnsiString(societe);}

If SHGetSpecialFolderLocation() fails, you are still calling 
SHGetPathFromIDList(), passing it an invalid ITEMIDLIST.  Don't do that.


Gambit 
Re: Problem with Vista
#417
Author: patrickartaud
Date: Wed, 09 Apr 2008 08:00
22 lines
1773 bytes
Thank you very much go to think another.
Thank you again
Regards
Patrick
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> a �crit dans le message de 
news:47fba024$1@newsgroups.borland.com...
>
> "patrickartaud" <patrickartaud@aidedecision.com> wrote in message 
> news:47fb4400$1@newsgroups.borland.com...
>
>> if(!SHGetSpecialFolderLocation(0,CSIDL_APPDATA,&List))
>>        {
> <snip>
>>        }else{SHGetPathFromIDList(List,Path);
>>                ChVista=Path+AnsiString(societe);}
>
> If SHGetSpecialFolderLocation() fails, you are still calling 
> SHGetPathFromIDList(), passing it an invalid ITEMIDLIST.  Don't do that.
>
>
> Gambit
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads