| |
|
|
Nico Madysa | CompileMarkSeparation' gilt ab Windows Vista oder höher
declare Long hShell32, hOle32
proc Init
hOle32 = ImportDLL("OLE32", "ole.")
hShell32 = ImportDLL("SHELL32", "shell.")
ole.CoInitialize(0)
endproc
proc Exit
ole.CoUnInitialize()
FreeDLL hOle32
FreeDLL hShell32
endproc
proc GetCurrentDesktopPath
declare String KnownFoldersID_Desktop, Long pPath, String desktopPath
/* Die KnownFolders IDs stehen (mehr oder weniger in Klartext)
in Microsofts knownfolders.h Headerdatei. Es sind nichts
Anderes als ein Haufen 16 Byte lange Konstanten. Aus
ihnen wiederum können die Pfade der verschiedensten
speziellen Ordner bezogen werden, selbst wenn diese vom
Nutzer verschoben worden sind. */
KnownFoldersID_Desktop = "\x3A\xCC\xBF\xB4\x2C\xDB\x4C\x42\xB0\x29\x7F\xE9\x9A\x87\xC6\x41"
shell.SHGetKnownFolderPath(Addr(KnownFoldersID_Desktop), 0, 0, Addr(pPath))
' Die obige Funktion hat uns die Adresse eines neu
' erzeugten Strings gegeben. Wir basteln daraus
' wieder einen XProfan-String.
desktopPath = StringW$(pPath, 0)
ole.CoTaskMemFree(pPath)
return desktopPath
endproc
cls
Init()
print GetCurrentDesktopPath()
Exit()
waitinput
end
|
|
|
| |
|
|
|
Jörg Sellmeyer | for which Windowsversion counts the? with XP I get a Error Message, that The function shell.SHGetKnownFolderPath uncharted is. Also is the Variable hShell32 not declared. For this becomes hUser32 not uses...
at least XP goes it so integrally easy: CompileMarkSeparation |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 02/28/14 ▲ |
|
|
|
|
Nico Madysa | Jörg Sellmeyer (28.02.14)
for which Windowsversion counts the? with XP I get a Error Message, that The function shell.SHGetKnownFolderPath uncharted is.
ex windows 7 geht's what about me have none reason anzunehmen, that it under Vista works. have time "ab windows Vista" added.
Jörg Sellmeyer (28.02.14)
Also is the Variable hShell32 not declared. For this becomes hUser32 not uses...
my Error. Variable was wrong declared, hab's korrigiert. was already late, as i so rumgefummelt having.
Jörg Sellmeyer (28.02.14)
at least XP goes it so integrally easy:
be over these "Known Folders" thing in the MSDN stumbled and it has whom appearance, that the The of M$ bevorzugte method is, these special Paths abzugreifen.
One Blogartikel of 2003 [...] declared, that the "Shell-Folders"-Registry-Key only from Kompatibilitätsgründen with irgendwelchen obskuren Programs from 1994 existing and not any more uses go ought to. The function SHGetSpecialFolderLocation , The therein instead suggested becomes, is in the meantime over again abgelöst been, and of course of SHGetKnownFolderPath [...] , the function, The I supra uses have.
If I The Ressourcen to the Topic correctly. understood have, has the Registryschlüssel "Shell Folders" under windows presently about whom status, whom Add-, Sub- and the others antiquated functions in XProfan 10 had. whether You it moreover verwendest, is nevertheless your thing. |
|
|
| |
|
|
|
Michael Wodrich | probably has eachone Microsoft-colleagues there its Own routine. God Thanks are The not any so mitteilsam How a few ... there had really a only Possibility fully ausgereicht. now white one again not, which the many Opportunities one benefit ought to.
your Fundstück runs on one Vista Ultimate integrally inspired.
the would Yes again Zündstoff for Forums: - instead of: which Programming-Language is the best.... - simply: which SpecialFolder-routine ought to one prefer....
(is you incidentally already time noticed: Diejenigen, The these question to put dive then into subesquent 10.000 Postings not any more on...
Greeting Michael Wodrich |
|
|
| |
|
|
|
Nico Madysa | [OFFTOPIC] Michael Wodrich (28.02.14) (is you incidentally already time noticed: Diejenigen, The these question to put dive then into subesquent 10.000 Postings not any more on...
probably are the people, The just to quarrel Search. [/OFFTOPIC] |
|
|
| |
|
|