Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.03.27;
Скачать: CL | DM;

Вниз

Как определить путь к рабочему столу   Найти похожие ветки 

 
DeskTop   (2005-02-16 13:58) [0]

текущего пользователя?. ОСи указаны в заголовке. Спасибо


 
Чапаев ©   (2005-02-16 14:06) [1]

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation(;

   HWND hwndOwner,  
   int nFolder,  
   LPITEMIDLIST *ppidl
  );


Parameters

hwndOwner

Handle of the owner window that the client should specify if it displays a dialog box or message box.

nFolder

Value specifying the folder to retrieve the location of. This parameter can be one of the following values:

CSIDL_BITBUCKET Recycle bin ѕ file system directory containing file objects in the user"s recycle bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.
CSIDL_CONTROLS Control Panel ѕ virtual folder containing icons for the control panel applications.
CSIDL_DESKTOP Windows desktop ѕ virtual folder at the root of the name space.
CSIDL_DESKTOPDIRECTORY File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
CSIDL_DRIVES My Computer ѕ virtual folder containing everything on the local computer: storage devices, printers, and Control Panel. The folder may also contain mapped network drives.
CSIDL_FONTS Virtual folder containing fonts.
CSIDL_NETHOOD File system directory containing objects that appear in the network neighborhood.
CSIDL_NETWORK Network Neighborhood ѕ virtual folder representing the top level of the network hierarchy.
CSIDL_PERSONAL File system directory that serves as a common respository for documents.
CSIDL_PRINTERS Printers folder ѕ virtual folder containing installed printers.
CSIDL_PROGRAMS File system directory that contains the user"s program groups (which are also file system directories).
CSIDL_RECENT File system directory that contains the user"s most recently used documents.
CSIDL_SENDTO File system directory that contains Send To menu items.
CSIDL_STARTMENU File system directory containing Start menu items.
CSIDL_STARTUP File system directory that corresponds to the user"s Startup program group.
CSIDL_TEMPLATES File system directory that serves as a common repository for document templates.


ppidl

Address that receives a pointer to an item identifier list specifying the folder"s location relative to the root of the name space (the desktop).



Return Values

Returns NOERROR if successful or an OLE-defined error result otherwise.


 
Ермак ©   (2005-02-16 14:15) [2]

Все предопределенные пути доступны через переменные окружения:
%systemroot% - директория Windows
%programfiles%
%userprofile% - профиль пользователя в Documents and Settings в XP. На 9х к сожалению проверить не могу. Открой cmd или command и попробуй. Но дело в том, что папка Desktop, AppData, MainMenu, Documents могут быть перенаправлены куда угодно - через реестр либо через групповую политику домена. Поэтому уверенным быть нельзя.
Но копать, я думаю, надо в направлении переменных окружения. Они точно должны быть и для этих папок. Перепробовал %userdesktop% и т.п. - не работает. Надо включать фантазию либо хелп...
Второй способ - найти в реестре. Там это прописывается тоже. Или искать функции WInAPI - для ситсемной папки точно есть, а для остальных - не уверен...


 
DeskTop   (2005-02-16 14:18) [3]

Благодарю, за оба поста



Страницы: 1 вся ветка

Текущий архив: 2005.03.27;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.034 c
1-1110952959
Mishenka
2005-03-16 09:02
2005.03.27
Как в DatetimePicker е вводить время с долями секунд?


3-1109151670
Strori
2005-02-23 12:41
2005.03.27
Проблема со вставкой данных в базу


3-1109698554
Arazel
2005-03-01 20:35
2005.03.27
А как сделать так что бы инкремент повышался и в других таблицах?


1-1110595554
zsv
2005-03-12 05:45
2005.03.27
Ассоциации


1-1110561555
avlan
2005-03-11 20:19
2005.03.27
Ошибка записи в файл