Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2011, 09:31 AM
Shadow Shadow is offline
Member
 
Join Date: Mar 2011
Posts: 39
Default Csidl_(______)_appdata

Hi there,

I've googled some code to set paths to the app data folder and I successfully found it on about.com. Although the code was set to the local app data folder.
This is the code:

Code:
function LocalAppDataPath : string;
 const
    SHGFP_TYPE_CURRENT = 0;
 var
    path: array [0..MAX_PATH] of char;
 begin
    SHGetFolderPath(0,CSIDL_LOCAL_APPDATA,0,SHGFP_TYPE_CURRENT,@path[0]) ;
    Result := path;
 end;
where:
Code:
CSIDL_LOCAL_APPDATA
is set to the local app data folder.

So would anyone know the code (CSIDL_(_____)_APPDATA) that would set the folder to app data, not local data?

I did try:
Code:
CSIDL_ROAMING_APPDATA
but it didn't work.

Thanks in advanced
Reply With Quote
  #2  
Old 04-25-2011, 10:57 AM
Glenn1234 Glenn1234 is offline
Senior Member
 
Join Date: Aug 2009
Posts: 131
Default

http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
Reply With Quote
  #3  
Old 04-25-2011, 09:05 PM
Shadow Shadow is offline
Member
 
Join Date: Mar 2011
Posts: 39
Default

Wow, a whole list of it. Thanks
Reply With Quote
  #4  
Old 04-25-2011, 09:18 PM
Shadow Shadow is offline
Member
 
Join Date: Mar 2011
Posts: 39
Default

So if I were to use the CSIDL for roaming app data, would it look like this?

Code:
function LocalAppDataPath : string;
 const
    SHGFP_TYPE_CURRENT = 0;
 var
    path: array [0..MAX_PATH] of char;
 begin
    SHGetFolderPath(0,FOLDERID_RoamingAppData,0,SHGFP_TYPE_CURRENT,@path[0]) ;
    Result := path;
 end;
I know its wrong, but just giving you the idea of where I'm trying to use it.

~Edit~
I just figured it out. Thanks for the link

Last edited by Shadow; 04-25-2011 at 09:27 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.