πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by patrickartaud Sat, 12 May 2007 08:05
Directoies with Vista
#2039
Author: patrickartaud
Date: Sat, 12 May 2007 08:05
12 lines
1417 bytes
Hello,
I don't understand why in my application Vista open read and write in some 
directories MyAppp/Dir1 etc....
and not other.
I had in others directories db files and in the dir it wants open dbf files 
I thought it was that I have all modified in my app and no it is not.
So I don't understand why it does this?
Now I go to try to change all to put them in users/username/.....Like it was 
said to me,but it is a lot of work!!!!
Have you any idea?
I thank you very much for your help
Patrick 
Re: Directoies with Vista
#1948
Author: Mike Collins
Date: Mon, 14 May 2007 09:22
23 lines
1842 bytes
Hay Patrick - it is not very clear from your post exactly what you problem 
is.

Vista has some very strange and stringent enforcements of user permissions. 
As far as I know, it protects the Program File directly from non admin 
access so this throws up a whole host of problems that weren't previously 
there.

"patrickartaud" <patrickartaud@aidedecision.com> wrote in message 
news:46457573$1@newsgroups.borland.com...
> Hello,
> I don't understand why in my application Vista open read and write in some 
> directories MyAppp/Dir1 etc....
> and not other.
> I had in others directories db files and in the dir it wants open dbf 
> files I thought it was that I have all modified in my app and no it is 
> not.
> So I don't understand why it does this?
> Now I go to try to change all to put them in users/username/.....Like it 
> was said to me,but it is a lot of work!!!!
> Have you any idea?
> I thank you very much for your help
> Patrick 
Re: Directoies with Vista
#1959
Author: patrickartaud
Date: Tue, 15 May 2007 08:24
57 lines
3699 bytes
Thank you Mike,
I have installed BCB6 on vista then my applications directory "progperso"
In which I have an apllication named "Optiessai"
This application has subdirectories:
"Mes Liasses"
.............
"Exemple"
When I debud my app it can open and write in "Mes liasses" but not open the 
Exemple directory it sais "network error" or EDBEngine error
My application creates directories too in tha application directory, but I 
can open to look for values in bdf file and save them but in other dll with 
(I think) the same code, I cant open the dbf files these files are in the 
directory creates by my application and in its own directory.
Here I can understand that vista have some restrictions, but when I go to 
look in c:\Progpreso\Optiessai\   the directories are created and the good 
files but it don't want open these.
I have the error have said to you.
Too I don't understand where is the mistake my application works fine with 
XP.
I have look for GetUserName etc... to pu the directories created in this 
place but I don't know how my application can see if it is running on XP or 
Vista, I have seen the method "obsolete" and I dont knox where to find the 
good method and what she returns.
What do you think, why in a side she works correctly and in other not!! for 
the directories already in the application? "Mes Liasses " which is ok and 
the "exemple" which is not.
Where must I question me :in my code? in Vista restrictions?Where to find 
solution?
I thank you in adavance
Patrick
"Mike Collins" <its@TheBottomOfThePost> a οΏ½crit dans le message de 
news:46481a11@newsgroups.borland.com...
> Hay Patrick - it is not very clear from your post exactly what you problem 
> is.
>
> Vista has some very strange and stringent enforcements of user 
> permissions. As far as I know, it protects the Program File directly from 
> non admin access so this throws up a whole host of problems that weren't 
> previously there.
>
> "patrickartaud" <patrickartaud@aidedecision.com> wrote in message 
> news:46457573$1@newsgroups.borland.com...
>> Hello,
>> I don't understand why in my application Vista open read and write in 
>> some directories MyAppp/Dir1 etc....
>> and not other.
>> I had in others directories db files and in the dir it wants open dbf 
>> files I thought it was that I have all modified in my app and no it is 
>> not.
>> So I don't understand why it does this?
>> Now I go to try to change all to put them in users/username/.....Like it 
>> was said to me,but it is a lot of work!!!!
>> Have you any idea?
>> I thank you very much for your help
>> Patrick
>
> 
Re: Directoies with Vista
#1963
Author: Bob Gonder
Date: Tue, 15 May 2007 17:06
23 lines
1547 bytes
patrickartaud wrote:

>I don't understand why in my application Vista open read and write in some 
>directories MyAppp/Dir1 etc....
>and not other.

Vista is "secure"
If you want to write in non-approved areas, you (the user, not the
programmer) must tell Vista that it is ok to do so.

>Now I go to try to change all to put them in users/username/.....Like it was 
>said to me,but it is a lot of work!!!!

Yes, but not so much work.

Use  SHGetSpecialFolderLocation()  with one of these
	CSIDL_APPDATA 
	CSIDL_COMMON_APPDATA 
	CSIDL_PERSONAL
	CSIDL_COMMON_DOCUMENTS 
depending on your requirements.

Works on Win95 too
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