На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
! Правила раздела Visual C++ / MFC / WTL (далее Раздела)
1) На Раздел распространяются все Правила Форума.
2) Перед тем, как создать новый топик, убедитесь, что Вы читали Правила создания тем в Разделе.
3) Вопросы, не связанные с программированием (настройки MS Visual Studio, книги, библиотеки и т.д.),
обсуждаются в разделе C/C++: Прочее
4) Вопросы разработки .NET (Windows Form, C++/CLI и т.п.) приложений на Visual C++/C# обсуждаются в разделе .NET.
5) Нарушение Правил может повлечь наказание со стороны модераторов.

Полезные ссылки:
user posted image FAQ Раздела user posted image Обновления для FAQ Раздела user posted image Поиск по Разделу user posted image MSDN Library Online
Модераторы: ElcnU
  
> Функция SHGetFolderPath
    Привет всем!!! Народ кто знает как использовать SHGetFolderPath(...), не могу понять где и как надо подключить для неё библиотеку?
      M
      Тема перенесена из C/C++ -> Сопутствующие вопросы


      Добавлено в :
      Я думаю, эта функция содержится в Microsoft Platform SDK : Shell32.lib или ShFolder.Lib

      У тебя наверное, VC 6?
        Думаю, будет полезно: литералы констант на русском языке!

        CSIDL_FLAG_CREATE (0x8000)
        Версия оболочки 5.0. Комбинируйте это значение с любым другим CSIDL и если системная папка будет пропущена, то она созлаться автоматически.

        CSIDL_ADMINTOOLS (0x0030)
        Версия оболочки 5.0. Системная папка "Утилиты Администратора" для текущего сеанса пользователя.

        CSIDL_ALTSTARTUP (0x001d)
        Папка "Автозагрузка" для текущего пользователя.

        CSIDL_APPDATA (0x001a)
        Версия оболочки 4.71. Системная папка данных для предложения. Обычный путь -
        C:\Documents and Settings\username\Application Data.
        Этот CSIDL поддерживается библиотекой Shfolder.dll для систем, в которых не
        установлен Microsoft® Internet Explorer 4.0, интегрированный в оболочку.

        CSIDL_BITBUCKET (0x000a)
        Виртуальная папка "Корзина".

        CSIDL_CDBURN_AREA (0x003b)
        Версия оболочки 6.0. Папка файлов, ожидающих записи на CD. Обычное расположение -
        C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\CD Burning.

        CSIDL_COMMON_ADMINTOOLS (0x002f)
        Версия оболочки 5.0. Тоже самое, что и CSIDL_ADMINTOOLS, но для всех пользователей.

        CSIDL_COMMON_ALTSTARTUP (0x001e)
        Тоже самое, что и CSIDL_ALTSTARTUP, но для всех пользователей.

        CSIDL_COMMON_APPDATA (0x0023)
        Версия оболочки 5.0. Тоже самое, что и CSIDL_APPDATA, но для всех пользователей.

        CSIDL_COMMON_DESKTOPDIRECTORY (0x0019)
        Тоже самое, что и CSIDL_DESKTOPDIRECTORY, но для всех пользователей.
        Только для Windows NT.

        CSIDL_COMMON_DOCUMENTS (0x002e)
        Тоже самое, что и CSIDL_MYDOCUMENTS, но для всех пользователей.
        Только для Windows NT и Microsoft Windows® 95 (Windows 98) с установленным Shfolder.dll.

        CSIDL_COMMON_FAVORITES (0x001f)
        Тоже самое, что и CSIDL_FAVORITES, но для всех пользователей.
        Только для Windows NT.

        CSIDL_COMMON_MUSIC (0x0035)
        Версия оболочки 6.0.
        Тоже самое, что и CSIDL_MYMUSIC, но для всех пользователей.

        CSIDL_COMMON_PICTURES (0x0036)
        Версия оболочки 6.0.
        Тоже самое, что и CSIDL_MYPICTURES, но для всех пользователей.

        CSIDL_COMMON_PROGRAMS (0x0017)
        Тоже самое, что и CSIDL_PROGRAMS, но для всех пользователей.
        Только NT-система.

        CSIDL_COMMON_STARTMENU (0x0016)
        Тоже самое, что и CSIDL_STARTMENU, но для всех пользователей.
        Только для Windows NT.

        CSIDL_COMMON_STARTUP (0x0018)
        Тоже самое, что и CSIDL_STARTUP, но для всех пользователей.
        Только для Windows NT.


        CSIDL_COMMON_TEMPLATES (0x002d)
        Шаблоны, доступные всем пользователям.
        Только для Windows NT.

        CSIDL_COMMON_VIDEO (0x0037)
        Версия оболочки 6.0. Тоже самое, что и CSIDL_MYVIDEO, но для всех пользователей.
        Только для Windows NT.

        CSIDL_CONTROLS (0x0003)
        Виртуальная папка "Панели управления".

        CSIDL_COOKIES (0x0021)
        Папка печенья (Internet Cookies)

        CSIDL_DESKTOP (0x0000)
        Виртуальная папка рабочего стола.

        CSIDL_DESKTOPDIRECTORY (0x0010)
        Реальная папка рабочего стола.

        CSIDL_DRIVES (0x0011)
        Виртуальная папка "Мой компьютер", содержащая сетевые диски, переферию, контрольную панель.

        CSIDL_FAVORITES (0x0006)
        Директория, содержащая, ссылки на избранные страницы текущего пользователя.

        CSIDL_FONTS (0x0014)
        Виртуальная папка шрифтов.

        CSIDL_HISTORY (0x0022)
        Папка, содержащая историю путешествия в сети Интернет.

        CSIDL_INTERNET (0x0001)
        Виртуальная папка Internet.

        CSIDL_INTERNET_CACHE (0x0020)
        Версия оболочки 4.72. Папка, содержащая временные файлы (кэш) Интернета.

        CSIDL_LOCAL_APPDATA (0x001c)
        Версия оболочки 5.0.
        Папка, содержащая локальные данные приложения.

        CSIDL_MYDOCUMENTS (0x000c)
        Версия оболочки 6.0. Виртуальная папка "Мои документы".

        CSIDL_MYMUSIC (0x000d)
        Папка, содержащая музыкальные файлы ("Моя музыка").

        CSIDL_MYPICTURES (0x0027)
        Версия оболочки 5.0.
        Папка, содержащая графические файлы.

        CSIDL_MYVIDEO (0x000e)
        Версия оболочки 6.0.
        Папка "Моё видео".

        CSIDL_NETHOOD (0x0013)
        Папка "Мои места в сети".

        CSIDL_NETWORK (0x0012)
        Папка локальной сети.

        CSIDL_PERSONAL (0x0005)
        Версия оболочки 6.0. Эквивалент CSIDL_MYDOCUMENTS.
        До версии оболочки 6.0. Реальная папка "Мои документы".

        CSIDL_PRINTERS (0x0004)
        Папка принтеров.

        CSIDL_PRINTHOOD (0x001b)
        Папка, содержащая виртуальные ссылки на принтеры.

        CSIDL_PROFILE (0x0028)
        Версия оболочки 5.0. Папка профиля пользователя.
        Как правило, программы не создают файлов в этой папке,
        она лишь позволяет получить доступ к подпапкам профиля.

        CSIDL_PROFILES (0x003e)
        Версия оболочки 6.0. Обычно - C:\Documents and Settings.
        Папка всех профилей.

        CSIDL_PROGRAM_FILES (0x0026)
        Версия оболочки 5.0. Папка программных файлов (обычно C:\Program Files).

        CSIDL_PROGRAM_FILES_COMMON (0x002b)
        Версия оболочки 5.0. Папка общих файлов программ.
        Только для Windows NT, Windows 2000 и Windows XP. Не для Windows Millennium Edition (Windows Me).

        CSIDL_PROGRAMS (0x0002)
        Папка ярлыков программ. Обычно располагается: C:\Documents and Settings\username\Start Menu\Programs.

        CSIDL_RECENT (0x0008)
        Папка ссылок на часто используемые документы.

        CSIDL_SENDTO (0x0009)
        Обычно: C:\Documents and Settings\username\SendTo.

        CSIDL_STARTMENU (0x000b)
        Папка, содержащая пункты меню "Пуск".

        CSIDL_STARTUP (0x0007)
        Папка "Автозагрузка".

        CSIDL_SYSTEM (0x0025)
        Версия оболочки 5.0.
        Системная папка System32 (System). Аналогично функции GetSystemDirectory();

        CSIDL_TEMPLATES (0x0015)
        Шаблоны для текущего сеанса пользователя.

        CSIDL_WINDOWS (0x0024)
        Версия оболочки 5.0. Системная папка Windows. Аналогично функции GetWindowsDirectory();

        В оригинале:
        Цитата

        CSIDL

        --------------------------------------------------------------------------------

        CSIDL values provide a unique system-independent way to identify special folders used frequently
        by applications, but which may not have the same name or location on any given system.
        For example, the system folder may be "C:\Windows" on one system and "C:\Winnt" on another.

        Constants

        CSIDL_FLAG_CREATE (0x8000)
        Version 5.0. Combine this CSIDL with any of the following CSIDLs to force the creation of the
        associated folder.

        CSIDL_ADMINTOOLS (0x0030)
        Version 5.0. The file system directory that is used to store administrative tools for an individual
        user. The Microsoft Management Console (MMC) will save customized consoles to this directory, and
        it will roam with the user.

        CSIDL_ALTSTARTUP (0x001d)
        The file system directory that corresponds to the user's nonlocalized Startup program group.

        CSIDL_APPDATA (0x001a)
        Version 4.71. The file system directory that serves as a common repository for application-specific
        data. A typical path is C:\Documents and Settings\username\Application Data. This CSIDL is
        supported by the redistributable Shfolder.dll for systems that do not have the Microsoft® Internet
        Explorer 4.0 integrated Shell installed.

        CSIDL_BITBUCKET (0x000a)
        The virtual folder containing the objects in the user's Recycle Bin.

        CSIDL_CDBURN_AREA (0x003b)
        Version 6.0. The file system directory acting as a staging area for files waiting to be written to
        CD. A typical path is C:\Documents and Settings\username\Local Settings\Application
        Data\Microsoft\CD Burning.

        CSIDL_COMMON_ADMINTOOLS (0x002f)
        Version 5.0. The file system directory containing administrative tools for all users of the
        computer.

        CSIDL_COMMON_ALTSTARTUP (0x001e)
        The file system directory that corresponds to the nonlocalized Startup program group for all users.
        Valid only for Microsoft Windows NT® systems.

        CSIDL_COMMON_APPDATA (0x0023)
        Version 5.0. The file system directory containing application data for all users. A typical path is
        C:\Documents and Settings\All Users\Application Data.

        CSIDL_COMMON_DESKTOPDIRECTORY (0x0019)
        The file system directory that contains files and folders that appear on the desktop for all users.
        A typical path is C:\Documents and Settings\All Users\Desktop. Valid only for Windows NT systems.

        CSIDL_COMMON_DOCUMENTS (0x002e)
        The file system directory that contains documents that are common to all users. A typical paths is
        C:\Documents and Settings\All Users\Documents. Valid for Windows NT systems and Microsoft Windows® 95 and Windows 98 systems with Shfolder.dll installed.

        CSIDL_COMMON_FAVORITES (0x001f)
        The file system directory that serves as a common repository for favorite items common to all
        users. Valid only for Windows NT systems.

        CSIDL_COMMON_MUSIC (0x0035)
        Version 6.0. The file system directory that serves as a repository for music files common to all
        users. A typical path is C:\Documents and Settings\All Users\Documents\My Music.

        CSIDL_COMMON_PICTURES (0x0036)
        Version 6.0. The file system directory that serves as a repository for image files common to all
        users. A typical path is C:\Documents and Settings\All Users\Documents\My Pictures.

        CSIDL_COMMON_PROGRAMS (0x0017)
        The file system directory that contains the directories for the common program groups that appear
        on the Start menu for all users. A typical path is C:\Documents and Settings\All Users\Start
        Menu\Programs. Valid only for Windows NT systems.

        CSIDL_COMMON_STARTMENU (0x0016)
        The file system directory that contains the programs and folders that appear on the Start menu for
        all users. A typical path is C:\Documents and Settings\All Users\Start Menu. Valid only for Windows
        NT systems.

        CSIDL_COMMON_STARTUP (0x0018)
        The file system directory that contains the programs that appear in the Startup folder for all
        users. A typical path is C:\Documents and Settings\All Users\Start Menu\Programs\Startup. Valid
        only for Windows NT systems.

        CSIDL_COMMON_TEMPLATES (0x002d)
        The file system directory that contains the templates that are available to all users. A typical
        path is C:\Documents and Settings\All Users\Templates. Valid only for Windows NT systems.

        CSIDL_COMMON_VIDEO (0x0037)
        Version 6.0. The file system directory that serves as a repository for video files common to all
        users. A typical path is C:\Documents and Settings\All Users\Documents\My Videos.

        CSIDL_CONTROLS (0x0003)
        The virtual folder containing icons for the Control Panel applications.

        CSIDL_COOKIES (0x0021)
        The file system directory that serves as a common repository for Internet cookies. A typical path
        is C:\Documents and Settings\username\Cookies.

        CSIDL_DESKTOP (0x0000)
        The virtual folder representing the Windows desktop, the root of the namespace.

        CSIDL_DESKTOPDIRECTORY (0x0010)
        The file system directory used to physically store file objects on the desktop (not to be confused
        with the desktop folder itself). A typical path is C:\Documents and Settings\username\Desktop.

        CSIDL_DRIVES (0x0011)
        The virtual folder representing My Computer, containing everything on the local computer: storage
        devices, printers, and Control Panel. The folder may also contain mapped network drives.

        CSIDL_FAVORITES (0x0006)
        The file system directory that serves as a common repository for the user's favorite items. A
        typical path is C:\Documents and Settings\username\Favorites.

        CSIDL_FONTS (0x0014)
        A virtual folder containing fonts. A typical path is C:\Windows\Fonts.

        CSIDL_HISTORY (0x0022)
        The file system directory that serves as a common repository for Internet history items.

        CSIDL_INTERNET (0x0001)
        A virtual folder representing the Internet.

        CSIDL_INTERNET_CACHE (0x0020)
        Version 4.72. The file system directory that serves as a common repository for temporary Internet
        files. A typical path is C:\Documents and Settings\username\Local Settings\Temporary Internet
        Files.

        CSIDL_LOCAL_APPDATA (0x001c)
        Version 5.0. The file system directory that serves as a data repository for local (nonroaming)
        applications. A typical path is C:\Documents and Settings\username\Local Settings\Application Data.

        CSIDL_MYDOCUMENTS (0x000c)
        Version 6.0. The virtual folder representing the My Documents desktop item.

        CSIDL_MYMUSIC (0x000d)
        The file system directory that serves as a common repository for music files. A typical path is
        C:\Documents and Settings\User\My Documents\My Music.

        CSIDL_MYPICTURES (0x0027)
        Version 5.0. The file system directory that serves as a common repository for image files. A
        typical path is C:\Documents and Settings\username\My Documents\My Pictures.

        CSIDL_MYVIDEO (0x000e)
        Version 6.0. The file system directory that serves as a common repository for video files. A
        typical path is C:\Documents and Settings\username\My Documents\My Videos.

        CSIDL_NETHOOD (0x0013)
        A file system directory containing the link objects that may exist in the My Network Places virtual
        folder. It is not the same as CSIDL_NETWORK, which represents the network namespace root. A typical
        path is C:\Documents and Settings\username\NetHood.

        CSIDL_NETWORK (0x0012)
        A virtual folder representing Network Neighborhood, the root of the network namespace hierarchy.

        CSIDL_PERSONAL (0x0005)
        Version 6.0. The virtual folder representing the My Documents desktop item. This is equivalent to
        CSIDL_MYDOCUMENTS. Previous to Version 6.0. The file system directory used to physically store a
        user's common repository of documents. A typical path is C:\Documents and Settings\username\My
        Documents. This should be distinguished from the virtual My Documents folder in the namespace. To
        access that virtual folder, use SHGetFolderLocation, which returns the ITEMIDLIST for the virtual location, or refer to the technique described in Managing the File System.


        CSIDL_PRINTERS (0x0004)
        The virtual folder containing installed printers.

        CSIDL_PRINTHOOD (0x001b)
        The file system directory that contains the link objects that can exist in the Printers virtual
        folder. A typical path is C:\Documents and Settings\username\PrintHood.

        CSIDL_PROFILE (0x0028)
        Version 5.0. The user's profile folder. A typical path is C:\Documents and Settings\username.
        Applications should not create files or folders at this level; they should put their data under the
        locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA.

        CSIDL_PROFILES (0x003e)
        Version 6.0. The file system directory containing user profile folders. A typical path is
        C:\Documents and Settings.

        CSIDL_PROGRAM_FILES (0x0026)
        Version 5.0. The Program Files folder. A typical path is C:\Program Files.

        CSIDL_PROGRAM_FILES_COMMON (0x002b)
        Version 5.0. A folder for components that are shared across applications. A typical path is
        C:\Program Files\Common. Valid only for Windows NT, Windows 2000, and Windows XP systems. Not valid
        for Windows Millennium Edition (Windows Me).

        CSIDL_PROGRAMS (0x0002)
        The file system directory that contains the user's program groups (which are themselves file system
        directories). A typical path is C:\Documents and Settings\username\Start Menu\Programs.

        CSIDL_RECENT (0x0008)
        The file system directory that contains shortcuts to the user's most recently used documents. A
        typical path is C:\Documents and Settings\username\My Recent Documents. To create a shortcut in
        this folder, use SHAddToRecentDocs. In addition to creating the shortcut, this function updates the
        Shell's list of recent documents and adds the shortcut to the My Recent Documents submenu of the
        Start menu.

        CSIDL_SENDTO (0x0009)
        The file system directory that contains Send To menu items. A typical path is C:\Documents and
        Settings\username\SendTo.

        CSIDL_STARTMENU (0x000b)
        The file system directory containing Start menu items. A typical path is C:\Documents and
        Settings\username\Start Menu.

        CSIDL_STARTUP (0x0007)
        The file system directory that corresponds to the user's Startup program group. The system starts
        these programs whenever any user logs onto Windows NT or starts Windows 95. A typical path is
        C:\Documents and Settings\username\Start Menu\Programs\Startup.

        CSIDL_SYSTEM (0x0025)
        Version 5.0. The Windows System folder. A typical path is C:\Windows\System32.

        CSIDL_TEMPLATES (0x0015)
        The file system directory that serves as a common repository for document templates. A typical path
        is C:\Documents and Settings\username\Templates.

        CSIDL_WINDOWS (0x0024)
        Version 5.0. The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables. A typical path is C:\Windows.

        Remarks

        These values supersede the use of environment variables for this purpose.

        A CSIDL is used in conjunction with one of four Shell functions, SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, and SHGetSpecialFolderPath, to retrieve a special folder's path or pointer to an item identifier list (PIDL).

        Combine CSIDL_FLAG_CREATE with any of the other CSIDLs to force the creation of the associated folder. The remaining CSIDLs correspond to either file system folders or virtual folders. Where the CSIDL identifies a file system folder, a commonly used path is given as an example. Other paths may be used. Some CSIDLs can be mapped to an equivalent %VariableName% environment variable. CSIDLs are more reliable, however, and should be used if possible.

        See Also

        SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, SHGetSpecialFolderPath

        --------------------------------------------------------------------------------

        © 2004 Microsoft Corporation. All rights reserved.
          Спасибо за инфо, но файликов
          Header: Declared in shfolder.h
          Import Library: ShFolder.Lib
          ни в системе, ни в инете я не нашёл. У меня VC 6.0, а SHGetFolderPath(...) меня вообще не понимает. Пытаюсь подключить ShFolder.dll через LoadLibrary(...) и всё равно не получается, кто знает, как с ней работать?
            Можно так:
            ExpandedWrap disabled
              typedef HRESULT (__stdcall *pSHGetFolderPath)(    HWND hwndOwner,
                  int nFolder,
                  HANDLE hToken,
                  DWORD dwFlags,
                  LPTSTR pszPath
              );
               
              #define CSIDL_PERSONAL 0x0005
              #define CSIDL_FLAG_CREATE 0x8000
              void func()
              {
                HMODULE hM=LoadLibrary("shell32.dll");
                if(hM)
                {
                  pSHGetFolderPath sfget=(pSHGetFolderPath)GetProcAddress(hM,"SHGetFolderPathA");
                  if(sfget)
                  {
                    TCHAR szPath[MAX_PATH];
                    if(SUCCEEDED(sfget(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, 0, szPath)))
                    {
                      MessageBox(NULL,szPath,"AAAAA",MB_ICONINFORMATION);
                    }
                  }
                  FreeLibrary(hM);
                }
              }
            myaut, чем такой длинный пост постить, лучше h-ник сделал бы и прикрепил... :rolleyes:

            Добавлено в :
            З.Ы. C ShFolder.dll тоже работает, там кстати и unicode-версия есть - SHGetFolderPathW
            Сообщение отредактировано: Adil -
              Хороший код, но в MFC чего то одни ошибки выдаёт:
              error C2007: #define syntax
              error C2018: unknown character '0xa0'
              Нельзя ли подробнее ...
                Цитата
                Rash, 10.08.04, 11:33
                error C2018: unknown character '0xa0'

                Где-то русская буковка закралось.
                  Цитата
                  myaut, 12.08.04, 12:27
                  Где-то русская буковка закралось.
                  Скорее всего да, хотя когда я сдираю этот код, вставляю и компиляю - никаких проблем...
                  Rash, на какой строке?
                    Всё заработало, всем спасибо очень помог код от Profi. Не работало т.к. при вставке кода из-за пробела пробелов показывало
                    error C2018: unknown character '0xa0'.

                    Можно ли с помощью с помощью SHGetFolderPath(...) создать не системную, а обычную папку?
                      Цитата
                      Rash, 12.08.04, 16:08
                      очень помог код от Profi

                      Ты наверное, хотел сказать "код от Adilа? :)
                        Цитата
                        Rash, 12.08.04, 16:08
                        Можно ли с помощью с помощью SHGetFolderPath(...) создать не системную, а обычную папку?
                        Эта функция не создаёт папок, а только получает путь к системным папкам
                          Да, извини не оттуда переписал.

                          Добавлено в :
                          Цитата
                          Adil, 12.08.04, 15:31

                          А как можно создать папку? А то файл без проблем, а папку ни как.
                            CreateDirectory()
                            CreateDirectoryEx()
                              SHGetFolderPath создает фолдер, если
                              Цитата
                              nFolder
                              [in] A CSIDL value that identifies the folder whose path is to be retrieved. Only real folders are valid. If a virtual folder is specified, this function will fail. You can force creation of a folder with SHGetFolderPath by combining the folder's CSIDL with CSIDL_FLAG_CREATE


                              Добавлено в :
                              Правда, относится это только к специальным директориям
                                Спасибо Братец Лис [B] за CreateDirectory(), я только не понял как записать структуру LPSECURITY_ATTRIBUTES, поэтому записал NULL и заработало.
                                  Цитата
                                  Rash, 12.08.04, 16:47
                                  поэтому записал NULL и заработало

                                  Сойдет :)
                                    Цитата
                                    Uncle_Bob, 12.08.04, 17:09
                                    SHGetFolderPath создает фолдер, если ...
                                    Хм. Точно. не знал :wub:
                                    Только работает это для только 5ой версии Shell32.dll и выше => под 95, 98 и NT4 это не работает
                                      Цитата
                                      Adil, 12.08.04, 18:33
                                      Только работает это для только 5ой версии Shell32.dll и выше

                                      Откуда такая информация?
                                        Цитата
                                        MSDN Library
                                        Copyright 1987-2002 Microsoft Corporation

                                        SHGetFolderPath Function
                                        ...
                                        Function Information
                                        ...
                                        Import library shell32.lib
                                        ...
                                        Цитата
                                        MSDN Library
                                        Copyright 1987-2002 Microsoft Corporation

                                        CSIDL
                                        --------------------------------------------------------------------------------
                                        CSIDL values provide a unique system-independent way to identify special folders used frequently by applications, but which may not have the same name or location on any given system. For example, the system folder may be "C:\Windows" on one system and "C:\Winnt" on another.

                                        Constants

                                        CSIDL_FLAG_CREATE
                                        Version 5.0. Combine this CSIDL with any of the following CSIDLs to force the creation of the associated folder.
                                        ...
                                        Цитата
                                        MSDN Library
                                        Copyright 1987-2002 Microsoft Corporation

                                        Shell and Common Controls Versions
                                        |Version |DLL Distribution | Platform
                                        ... | |
                                        |5.00 |Shell32.dll | Windows 2000 and Windows Millennium Edition (Windows Me). See note 3.
                                        |...
                                        Note 3: Version 5.80 of Comctl32.dll and version 5.0 of Shlwapi.dll are distributed with Internet Explorer 5. They will be found on all systems on which Internet Explorer 5 is installed, except Windows 2000. Internet Explorer 5 does not update the Shell, so version 5.0 of Shell32.dll will not be found on Windows NT, Windows 95, or Windows 98 systems. Version 5.0 of Shell32.dll will be distributed with Windows 2000 and Windows Me, along with version 5.0 of Shlwapi.dll, and version 5.81 of Comctl32.dll
                                        Сообщение отредактировано: Adil -
                                          Млин, у этих мелкомягких правая рука не знает, что делает левая. В MSDN на моем компе

                                          Цитата
                                          MSDN Library

                                          Copyright 1987-2003 Microsoft Corporation


                                          nFolder[in] A CSIDL value that identifies the folder whose path is to be retrieved. Only real folders are valid. If a virtual folder is specified, this function will fail. You can force creation of a folder with SHGetFolderPath by combining the folder's CSIDL with CSIDL_FLAG_CREATE.

                                          ...

                                          Function Information

                                          Header shlobj.h
                                          Import library shfolder.dll
                                          Minimum operating systems Windows NT 4.0, Windows 95


                                          На сайте у них ( http://msdn.microsoft.com/library/default....tfolderpath.asp ):

                                          Цитата
                                          nFolder[in] A CSIDL value that identifies the folder whose path is to be retrieved. Only real folders are valid. If a virtual folder is specified, this function will fail. You can force creation of a folder with SHGetFolderPath by combining the folder's CSIDL with CSIDL_FLAG_CREATE.

                                          ...

                                          Function Information
                                          Minimum DLL Version shell32.dll version 5.0 or later
                                          Custom Implementation No
                                          Header shlobj.h
                                          Import library None
                                          Minimum operating systems Windows 95 with Internet Explorer 5.0, Windows 98 with Internet Explorer 5.0, Windows 98 Second Edition (SE), Windows NT 4.0 with Internet Explorer 5.0, Windows NT 4.0 with Service Pack 4 (SP4)
                                          Unicode Implemented as ANSI and Unicode versions.


                                          Вообще, я был почти уверен, что 5-й эксплорер ставит shell32.dll версии 5.0, т.е. даже на 95-х виндах есть способ заставить эту функцию работать, но как у мелкомягких про это написано! Ужасъ :wacko:
                                            Uncle_Bob, мне кажется, что сама функция будет работать с Minimum operating systems Windows 95 with Internet Explorer 5.0, Windows 98 with Internet Explorer 5.0, Windows 98 Second Edition (SE), Windows NT 4.0 with Internet Explorer 5.0, Windows NT 4.0 with Service Pack 4 (SP4), но без флага CSIDL_FLAG_CREATE, а вот ему как и раз и требуется 5ая версия sheell'a. Там еще несколько таких флагов: CSIDL_COMMON_APPDATA,CSIDL_LOCAL_APPDATA,CSIDL_MYPICTURES,CSIDL_PROFILE и т.д.
                                              Мда. Adil, сдается мне, что ты прав.

                                              Цитата
                                              Internet Explorer 5 does not update the Shell, so version 5.0 of Shell32.dll will not be found on Windows NT, Windows 95, or Windows 98 systems. Version 5.0 of Shell32.dll will be distributed with Windows 2000 and Windows Me, along with version 5.0 of Shlwapi.dll, and version 5.81 of Comctl32.dll
                                              1 пользователей читают эту тему (1 гостей и 0 скрытых пользователей)
                                              0 пользователей:


                                              Рейтинг@Mail.ru
                                              [ Script execution time: 0.2615 ]   [ 15 queries used ]   [ Generated: 14.06.26, 05:14 GMT ]