Changeset 5583 for trunk/src/comdlg32/filedlgbrowser.c
- Timestamp:
- Apr 24, 2001, 10:37:25 PM (25 years ago)
- File:
-
- 1 edited
-
trunk/src/comdlg32/filedlgbrowser.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/filedlgbrowser.c
r4561 r5583 5 5 */ 6 6 7 #include <stdio.h> 8 #include <string.h> 9 10 #include "windef.h" 11 #include "winbase.h" 12 #include "winnls.h" 13 #include "wingdi.h" 14 #include "winuser.h" 15 #include "heap.h" 16 #include "debugtools.h" 17 18 #include "shlwapi.h" 19 #include "filedlgbrowser.h" 20 #include "cdlg.h" 21 #include "shlguid.h" 22 #include "wine/obj_serviceprovider.h" 23 7 24 #ifdef __WIN32OS2__ 8 #include <windef.h>9 #include <winbase.h>10 #include <wingdi.h>11 #include <winuser.h>12 25 #include <heapstring.h> 13 26 #include <misc.h> 14 15 27 #endif 16 17 #include <stdio.h>18 #include "unknwn.h"19 #include "filedlgbrowser.h"20 #include "windef.h"21 #include "wingdi.h"22 #include "winuser.h"23 #include "wine/winestring.h"24 #include "heap.h"25 #include "shlguid.h"26 #include "wine/obj_dataobject.h"27 #include "debugtools.h"28 #include "cdlg.h"29 30 #define INITGUID31 #include "initguid.h"32 #include "wine/obj_serviceprovider.h"33 28 34 29 DEFAULT_DEBUG_CHANNEL(commdlg); … … 84 79 * Helper functions 85 80 */ 81 82 static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos) 83 { 84 char lpstrPath[MAX_PATH]; 85 SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath); 86 SetCurrentDirectoryA(lpstrPath); 87 TRACE("new current folder %s\n", lpstrPath); 88 } 86 89 87 90 /* copied from shell32 to avoid linking to it */ … … 98 101 99 102 case STRRET_CSTRA: 100 lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len); 103 if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, (LPWSTR)dest, len )) 104 ((LPWSTR)dest)[len-1] = 0; 101 105 break; 102 106 … … 104 108 if (pidl) 105 109 { 106 lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); 110 if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, 111 -1, (LPWSTR)dest, len )) 112 ((LPWSTR)dest)[len-1] = 0; 107 113 } 108 114 break; … … 111 117 FIXME("unknown type!\n"); 112 118 if (len) 113 { *(LP STR)dest = '\0';119 { *(LPWSTR)dest = '\0'; 114 120 } 115 121 return(FALSE); … … 140 146 sb->lpVtblCommDlgBrowser = &IShellBrowserImpl_ICommDlgBrowser_Vtbl; 141 147 sb->lpVtblServiceProvider = &IShellBrowserImpl_IServiceProvider_Vtbl; 142 COMDLG32_SHGetSpecialFolderLocation(hwndOwner, CSIDL_DESKTOP,148 SHGetSpecialFolderLocation(hwndOwner, CSIDL_DESKTOP, 143 149 &fodInfos->ShellInfos.pidlAbsCurrent); 144 150 … … 157 163 ICOM_THIS(IShellBrowserImpl, iface); 158 164 159 #ifndef __WIN32OS2__160 165 TRACE("(%p)\n\t%s\n", This, debugstr_guid(riid)); 161 #endif162 166 163 167 *ppvObj = NULL; … … 376 380 COMDLG32_SHFree((LPVOID)fodInfos->ShellInfos.pidlAbsCurrent); 377 381 fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp; 382 383 COMDLG32_UpdateCurrentDir(fodInfos); 378 384 379 385 /* Create the window */ … … 791 797 if (SUCCEEDED(COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl))) 792 798 { 793 if ( COMDLG32_PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))799 if (PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter)) 794 800 return S_OK; 795 801 } … … 905 911 _ICOM_THIS_FromIServiceProvider(IShellBrowser,iface); 906 912 907 #ifndef __WIN32OS2__908 913 FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) ); 909 #endif910 914 911 915 *ppv = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
