>From the 2008 RBase Conference, here is some of the stuff I furnished to
>attendees:
{begin code}
{demo of SHGetSpecialFolderPath function mbyerley 6/1/2008 }
-- These are a few of the Special Folders CSIDL Constant Value
SET VAR csidl_personal Integer = 5
SET VAR csidl_deskdir Integer = 16
SET VAR windows Integer = 36
SET VAR common_startmenu Integer = 22
SET VAR max_path Integer = 260
SET VAR lngfolderfound Integer = NULL
SET VAR strpath TEXT = NULL
SET VAR specfolder TEXT = NULL
IF (chkfunc('SHGetSpecialFolderPathA')) = 0 THEN
STDCALL function 'SHGetSpecialFolderPathA' ALIAS 'SHGetSpecialFolderPath' +
(Integer, Integer, ptr TEXT (260), Integer) : Integer
ENDIF
{ Set the value of the Special Folder you want the Path Returned From
In this Example, the "Desktop" folder.
}
-- just uncomment one of the following to see results.
--SET VAR lngfolder = .common_startmenu
--SET VAR lngfolder = .csidl_personal
--SET VAR lngfolder = .windows
SET VAR lngfolder = .csidl_deskdir
{ Set the variable strpath to Null.
strpath is passed by Reference and is filled with the PATH in the function.
If you wanted to Create the Special Folder if it is NOT FOUND, you would
change the first 0 in the DLCALL argument to a NON ZERO value.
}
lngfolderfound = (dlcall('Shell32', 'SHGetSpecialFolderPathA', 0, lngfolder,
strpath, 0))
IF lngfolderfound > 0 THEN
-- The strpath var has to be SGET to omit the trailing nulls from the BUFFER
SET VAR specfolder = .strpath
ENDIF
PAUSE 2 USING .specfolder
RETURN
{end code}
Then here is a list of constant values to use for most of the other SPECIAL
windows folders:
{ A List of CSIDL Constant values to use in
the SHGetSpecialFolderPath function}
-- <desktop>
SET VAR desktop Integer = 0
-- Internet Explorer (icon on desktop)
SET VAR internet Integer = 1
-- Start Menu\Programs
SET VAR programs Integer = 2
-- My Computer\Control Panel
SET VAR controls Integer = 3
-- My Computer\Printers
SET VAR PRINTERS Integer = 4
-- My Documents
SET VAR personal Integer = 5
-- <user name>\Favorites
SET VAR favorites Integer = 6
-- Start Menu\Programs\Startup
SET VAR start_up Integer = 7
-- <user name>\Recent
SET VAR recent Integer = 8
-- <user name>\SendTo
SET VAR sendto Integer = 9
-- <desktop>\Recycle Bin
SET VAR bitbucket Integer = 10
-- <user name>\Start Menu
SET VAR startmenu Integer = 11
-- logical "My Documents" desktop icon
SET VAR mydocuments Integer = 12
-- "My Music" folder
SET VAR mymusic Integer = 13
-- "My Videos" folder
SET VAR myvideo Integer = 14
-- <user name>\Desktop
SET VAR desktop_dir Integer = 16
-- My Computer
SET VAR DRIVES Integer = 17
-- Network Neighborhood (My Network Places)
SET VAR network Integer = 18
-- <user name>\nethood
SET VAR nethood Integer = 19
-- windows\fonts
SET VAR FONTS Integer = 20
-- templates
SET VAR templates Integer = 21
-- All Users\Start Menu
SET VAR common_startmenu Integer = 22
-- All Users\Start Menu\Programs
SET VAR common_prgs Integer = 23
-- All Users\Startup
SET VAR common_startup Integer = 24
-- All Users\Desktop
SET VAR common_desktopdir Integer = 25
-- <user name>\Application Data
SET VAR appdata Integer = 26
-- <user name>\PrintHood
SET VAR printhood Integer = 27
-- <user name>\Local Settings\Application Data (non roaming)
SET VAR local_appdata Integer = 28
-- non localized startup
SET VAR alt_startup Integer = 29
-- non localized common startup
SET VAR common_altstartup Integer = 30
SET VAR common_favorites Integer = 31
SET VAR internet_cache Integer = 32
SET VAR cookies Integer = 33
SET VAR history Integer = 34
-- All Users\Application Data
SET VAR common_appdata Integer = 35
-- GetWindowsDirectory()
SET VAR windows Integer = 36
-- GetSystemDirectory()
SET VAR system_dir Integer = 37
-- C:\Program Files
SET VAR prg_files Integer = 38
-- C:\Program Files\My Pictures
SET VAR mypictures Integer = 39
-- USERPROFILE
SET VAR profile Integer = 40
-- x86 system directory on RISC
SET VAR system86 Integer = 41
-- x86 C:\Program Files on RISC
SET VAR prg_files86 Integer = 42
-- C:\Program Files\Common
SET VAR prg_files_common Integer = 43
-- x86 Program Files\Common on RISC
SET VAR prg_files_common86 Integer = 44
-- All Users\Templates
SET VAR common_templates Integer = 45
-- All Users\Documents
SET VAR common_documents Integer = 46
-- All Users\Start Menu\Programs\Administrative Tools
SET VAR common_admintools Integer = 47
-- <user name>\Start Menu\Programs\Administrative Tools
SET VAR admintools Integer = 48
-- Network and Dial-up Connections
SET VAR connections Integer = 49
-- All Users\My Music
SET VAR common_music Integer = 53
-- All Users\My Pictures
SET VAR common_pictures Integer = 54
-- All Users\My Video
SET VAR common_video Integer = 55
-- Resource Directory
SET VAR resources Integer = 56
-- Localized Resource Directory
SET VAR resources_loclized Integer = 57
-- Links to All Users OEM specific apps
SET VAR common_oem_links Integer = 58
-- USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
SET VAR cdburn_area Integer = 59
-- unused Integer = &H3C
-- Computers Near Me (computered from Workgroup membership)
SET VAR computers_near_me Integer = 61
-- combine with value to force folder creation in SHGetFolderPath()
SET VAR flag_create Integer = 32768
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of TOM
> HART
> Sent: Friday, July 10, 2015 7:34 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Desktop
>
> How do you send a file to desktop in Rbase. I know you can output
> c:\whatever, but what is the command to send to desktop
>
> Tom Hart
>