` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Current User Desktop Folder
2013-06-27 -- Dave Nichols
 
!Get the users or global Desktop path !gxGetDesktopPath(BYTE=0),STRING ! ! !the Desktop path or '' if can't find it ! !iff TRUE get the common desktop (all users), else just this users gxGetDesktopPath FUNCTION(Common) CSIDL:CREATE EQUATE(8000h) CSIDL:COMMON_DESKTOPDIRECTORY EQUATE(0019h) CSIDL:DESKTOPDIRECTORY EQUATE(0010h) DesktopPath CSTRING(261),AUTO PIDL LONG FolderId LONG CODE IF Common FolderId = CSIDL:COMMON_DESKTOPDIRECTORY ELSE FolderId = CSIDL:DESKTOPDIRECTORY END IF SHGetSpecialFolderLocation(0,FolderId+CSIDL:CREATE,PIDL) = 0 IF SHGetPathFromIDList(PIDL,DesktopPath) = 1 !OK ELSE DesktopPath = '' END CoTaskMemFree(PIDL) ELSE DesktopPath = '' END RETURN Clip(DesktopPath) The windoze prototypes are: SHGetSpecialFolderLocation(LONG,LONG,*LONG),LONG,PASCAL,RAW,NAME('SHGetSpecialFolderLocation') SHGetPathFromIDList(LONG,*CSTRING),BYTE,PASCAL,RAW,NAME('SHGetPathFromIDList') CoTaskMemFree(LONG),PASCAL,RAW,NAME('CoTaskMemFree') and gxGetDesktopPath(BYTE=0),STRING


Today is November 21, 2024, 7:13 am
This article has been viewed 35316 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: