Nice work.<br><br>I will definitely make a note of that one.<br><br>Thanks rodi.<br><br>Adam.<br><br><div class="gmail_quote">On 29 March 2010 23:02, rodi <span dir="ltr">&lt;<a href="mailto:c22rs@web.de">c22rs@web.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello PytonCE users,<br>
<br>
have solved the question. The appropriate function<br>
is &#39;SHGetSpecialFolderPath&#39;: see<br>
<a href="http://msdn.microsoft.com/en-us/library/aa931257.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa931257.aspx</a><br>
<br>
May be this info and the follwing code snippet is helpfull to others :)<br>
<br>
import ctypes<br>
from time import sleep<br>
<br>
HANDLE = ctypes.c_ulong<br>
HWND = HANDLE<br>
INT = ctypes.c_int<br>
BOOL = ctypes.c_int<br>
<br>
SHGetSpecialFolderPath = ctypes.windll.coredll.SHGetSpecialFolderPath<br>
# BOOL SHGetSpecialFolderPath( HWND hwndOwner, LPTSTR lpszPath, int nFolder,<br>
BOOL fCreate );<br>
SHGetSpecialFolderPath.argtypes = [HWND, ctypes.c_wchar_p, INT, BOOL]<br>
MAX_PATH = 260<br>
path = ctypes.create_unicode_buffer(MAX_PATH)<br>
for i in range(0, 60): #[CSIDL_STARTMENU, CSIDL_PROGRAMS]:<br>
    try:<br>
        SHGetSpecialFolderPath( 0,  path, i, 0)<br>
        if len(path.value)&gt;0:<br>
            print i, path.value<br>
        else:<br>
            print i, &#39;not supported&#39;<br>
    except Exception, e:<br>
        print i, &#39;exception&#39;, e<br>
sleep(5)<br>
<div><div></div><div class="h5"><br>
<br>
Cheers rodi.<br>
_______________________________________________<br>
PythonCE mailing list<br>
<a href="mailto:PythonCE@python.org">PythonCE@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pythonce" target="_blank">http://mail.python.org/mailman/listinfo/pythonce</a><br>
</div></div></blockquote></div><br>