Ooops
March 04, 2021, 12:38:12 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
File Utilities
»
[bb] find mydocuments by b32 [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] find mydocuments by b32 [ 1+ years ago ] (Read 571 times)
BlitzBot
Jr. Member
Posts: 1
[bb] find mydocuments by b32 [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:42 AM »
Title :
find mydocuments
Author :
b32
Posted :
1+ years ago
Description :
Uses SHGetFolderPathA to obtain the 'mydocuments' folder path.
Code :
Code: BlitzBasic
;Save these lines as a textfile in the directory c:program fileslitz3duserlibs
;and call the file 'shell32.decls'
;-------------------------------------
;.lib "shell32.dll"
;api_GetFolderPath%(hwnd, p1, p2, p3, out*) : "SHGetFolderPathA"
;-------------------------------------
;it will enable the api_getfolderpath command
Print
GetMyDocumentsPath$
(
)
WaitKey
(
)
End
;-------------------------------------------------------------------------------------------------------
; GetMyDocumentsPath()
;-------------------------------------------------------------------------------------------------------
;uses SHGetFolderPathA to get the mydocuments folder
Function
GetMyDocumentsPath$
(
)
bank =
CreateBank
(
256
)
api_GetFolderPath
(
0
, $5,
0
,
0
, bank
)
s$ =
""
For
i =
0
To
255
b =
PeekByte
(
bank, i
)
If
b =
0
Then
Exit
s$ = s$ +
Chr
$
(
b
)
Next
FreeBank
bank
If
Right
$
(
s$,
1
)
<>
""
Then
s$ = s$ +
""
Return
s$
End Function
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
File Utilities
»
[bb] find mydocuments by b32 [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal