shell32.dll version 5.00

This is a discussion on shell32.dll version 5.00 within the Windows Programming forums, part of the Platform Specific Boards category; I have a problem using the following function : Code: HRESULT SHGetFolderLocation( HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, ...

  1. #1
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788

    shell32.dll version 5.00

    I have a problem using the following function :
    Code:
    HRESULT SHGetFolderLocation(
        HWND hwndOwner,
        int nFolder,
        HANDLE hToken,
        DWORD dwReserved,
        LPITEMIDLIST *ppidl
    );
    The compiler reckons that it's an undeclared identifier.
    I have included <shlobj.h>.

    In the documentation, it says that version 5.00 of shell32.dll is required. Does XP have this version of the file or do I have to download the new version?

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    I have version 6.0.2800.1145 on my XP system. If you go to C:\Windows\system32, find the file right click it and choose properties, then the Version tag you can see what you've got. I keep my system as up to date as possible, so mine maybe newer.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788
    I have the same version, yet i can't use that function.

  4. #4
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    What compiler? Does it support that header?

    Is there a lib file you need to link?

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    The error message suggests the function is not prototyped. I've never used the function, but if you look in the header...

    Code:
    #if (_WIN32_IE >= 0x0400)
    SHSTDAPI_(void) SHFlushSFCache(void);   
    SHSTDAPI_(LPITEMIDLIST) SHCloneSpecialIDList(HWND hwnd, int csidl, BOOL fCreate);  
    SHSTDAPI_(BOOL) SHGetSpecialFolderPathA(HWND hwnd, LPSTR pszPath, int csidl, BOOL fCreate);
    SHSTDAPI_(BOOL) SHGetSpecialFolderPathW(HWND hwnd, LPWSTR pszPath, int csidl, BOOL fCreate);
    #ifdef UNICODE
    #define SHGetSpecialFolderPath  SHGetSpecialFolderPathW
    #else
    #define SHGetSpecialFolderPath  SHGetSpecialFolderPathA
    #endif // !UNICODE
    
    #if (_WIN32_IE >= 0x0500)
    
    typedef enum {
        SHGFP_TYPE_CURRENT  = 0,   // current value for user, verify it exists
        SHGFP_TYPE_DEFAULT  = 1,   // default value, may not exist
    } SHGFP_TYPE;
    
    SHFOLDERAPI SHGetFolderPathA(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
    SHFOLDERAPI SHGetFolderPathW(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
    #ifdef UNICODE
    #define SHGetFolderPath  SHGetFolderPathW
    #else
    #define SHGetFolderPath  SHGetFolderPathA
    #endif // !UNICODE
    SHSTDAPI SHGetFolderLocation(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPITEMIDLIST *ppidl);
    
    SHFOLDERAPI SHGetFolderPathAndSubDirA(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPCSTR pszSubDir, LPSTR pszPath);
    SHFOLDERAPI SHGetFolderPathAndSubDirW(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPCWSTR pszSubDir, LPWSTR pszPath);
    #ifdef UNICODE
    #define SHGetFolderPathAndSubDir  SHGetFolderPathAndSubDirW
    #else
    #define SHGetFolderPathAndSubDir  SHGetFolderPathAndSubDirA
    #endif // !UNICODE
    
    #endif      // _WIN32_IE >= 0x0500
    
    #endif      // _WIN32_IE >= 0x0400
    ... it would seem that it is only valid if _WIN32_IE is >= 0x0500. Now, this could well be set somewhere else and I don't have the time to track it, but you might try defining that symbol. If that doesn't compile, track the symbol and see where it is set.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788
    How would one import libraries in Visual Studio .NET ?

    I'm writing a console win32 app and I need to import two libs.

  7. #7
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by The Dog
    How would one import libraries in Visual Studio .NET ?

    I'm writing a console win32 app and I need to import two libs.
    LoadLibrary & GetProcAddress

    A search will reveal more info on these apis

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. No Version info tab in file properties?
    By cpjust in forum Windows Programming
    Replies: 2
    Last Post: 06-03-2008, 03:42 PM
  3. How to set File Version of VC++ 6 dll
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 12-08-2006, 01:49 PM
  4. Finding the windows version...
    By The_Muffin_Man in forum Windows Programming
    Replies: 1
    Last Post: 06-10-2004, 11:39 PM
  5. Replies: 2
    Last Post: 05-22-2004, 02:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21