CSIDL_PROGRAM_FILESX86 in 64bit XP

Discussion in 'Windows 64bit' started by Ted, Dec 7, 2005.

  1. Ted

    Ted Guest

    I was able to get all 64 bit and 32 bit folders except
    Program Files
    which is the 64 bit Program Files folder.
    The 32 bit folder is Program Files (x86)

    Calling API SHGetFolderPath
    sPath = GetSpecialFolderPath(0, CSIDL_PROGRAM_FILES)
    I get the Program Files (x86) path instead, it
    doesn't return the Program Files as it suppose to.

    I use below function:
    Public Function GetSpecialFolderPath(hwnd As Long, nFolder As Long) As
    String
    If OSVers = 3 Then Call Disable64Redir
    Dim pidl As Long
    Dim sPath As String * MAX_PATH
    If SHGetSpecialFolderLocation(hwnd, nFolder, pidl) = NOERROR Then
    If pidl Then
    If SHGetPathFromIDList(pidl, sPath) Then
    GetSpecialFolderPath = Left$(sPath, InStr(sPath, vbNullChar) - 1)
    End If
    CoTaskMemFree pidl
    End If
    End If
    End Function

    sPath = GetSpecialFolderPath(0, CSIDL_PROGRAM_FILES)
    sPath = GetSpecialFolderPath(0, CSIDL_PROGRAM_FILESX86)

    Any ideas ?
    Thanks
    Ted, Dec 7, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?emltbWVybWE=?=

    Dual boot with Server 2003 64bit and XP 64bit

    =?Utf-8?B?emltbWVybWE=?=, Oct 10, 2006, in forum: Windows 64bit
    Replies:
    8
    Views:
    781
    Colin Barnhorst
    Oct 11, 2006
  2. Charles Chambers

    XP 64bit and Vista 64bit questions

    Charles Chambers, Feb 19, 2007, in forum: Windows 64bit
    Replies:
    2
    Views:
    443
    S.SubZero
    Feb 20, 2007
  3. =?Utf-8?B?ZWRoZWFk?=

    64bit print server - no 64bit drivers

    =?Utf-8?B?ZWRoZWFk?=, Mar 30, 2007, in forum: Windows 64bit
    Replies:
    1
    Views:
    970
    Charlie Russel - MVP
    Mar 30, 2007
  4. Tarvirdi
    Replies:
    1
    Views:
    698
    Charlie Russel - MVP
    Nov 11, 2007
  5. null
    Replies:
    2
    Views:
    427
    Charlie Russel - MVP
    Apr 2, 2008
Loading...

Share This Page