PDA

View Full Version : Clarion question - csidl common docs folder



enstorms
08-15-2007, 08:42 AM
c6.3ee & sb prof. edition
Created the CSIDL_Common_Documents folder to install my app data files. I understand this to mean that SB will detect type of OS it is installing on and will install them in the correct folder. Tried it on my XP Machine (don't have Vista yet) and it did in fact install in the C:\Documents and Settings\All Users\Shared Documents folder. Now, without having to hard code this in SETPATH in Global embeds, how would I use a variable to tell my app where this folder is? I know this is probalbly a very basic question to some of you gurus, but I've never delt with it before.
Thanks for any help.
Ernie

linder
08-15-2007, 08:46 AM
Ernie,

From within your Clarion application, use the SHGetSpecialFolderLocation API to detect that folder.

Friedrich

enstorms
08-15-2007, 09:05 AM
Thanks for the quick reply, Friedrich. I'll have to get back into APIs and do some research. Haven't used any in a while.
Thanks again.
Ernie

Charles J. Edmonds
08-15-2007, 12:41 PM
Ernie,

If you have WinEvent (and you should<g>) just use it.

It makes getting the CSIDL locations a one line call.


GLO:AllUsersDocuments = LONGPATH( CLIP( ds_GetFolderPath( WE::CSIDL_COMMON_DOCUMENTS )))

The ds_GetFolderPath is the method and the WE::CSIDL_COMMON_DOCUMENTS is the equate you want to access.

All the others are already setup as well.

Nothing to it!

;-)

Charles