Changeset 8048 for trunk/src/shell32/shellstring.c
- Timestamp:
- Mar 8, 2002, 12:01:03 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shellstring.c
r6709 r8048 6 6 #include "winnls.h" 7 7 #include "winerror.h" 8 #include "debugtools.h" 9 #include "heap.h" 8 #include "winreg.h" 10 9 11 10 #include "shlobj.h" 12 #include "shlwapi.h"13 11 #include "shellapi.h" 14 12 #include "shell32_main.h" 15 13 #include "wine/undocshell.h" 16 14 #include "wine/unicode.h" 15 #include "debugtools.h" 17 16 18 17 DEFAULT_DEBUG_CHANNEL(shell); 19 18 20 19 /************************* STRRET functions ****************************/ 20 21 /* 22 * ***** NOTE ***** 23 * These routines are identical to StrRetToBuf[AW] in dlls/shlwapi/string.c. 24 * They were duplicated here because not every version of Shlwapi.dll exports 25 * StrRetToBuf[AW]. If you change one routine, change them both. YOU HAVE BEEN 26 * WARNED. 27 * ***** NOTE ***** 28 */ 29 30 HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 31 { 32 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl); 33 34 switch (src->uType) 35 { 36 case STRRET_WSTR: 37 WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL); 38 /* SHFree(src->u.pOleStr); FIXME: is this right? */ 39 break; 40 41 case STRRET_CSTRA: 42 lstrcpynA((LPSTR)dest, src->u.cStr, len); 43 break; 44 45 case STRRET_OFFSETA: 46 lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); 47 break; 48 49 default: 50 FIXME("unknown type!\n"); 51 if (len) 52 { 53 *(LPSTR)dest = '\0'; 54 } 55 return(FALSE); 56 } 57 return S_OK; 58 } 59 60 /************************************************************************/ 61 62 HRESULT WINAPI StrRetToStrNW (LPVOID dest1, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 63 { 64 LPWSTR dest = (LPWSTR) dest1; 65 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl); 66 67 switch (src->uType) 68 { 69 case STRRET_WSTR: 70 lstrcpynW((LPWSTR)dest, src->u.pOleStr, len); 71 /* SHFree(src->u.pOleStr); FIXME: is this right? */ 72 break; 73 74 case STRRET_CSTRA: 75 if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len) 76 dest[len-1] = 0; 77 break; 78 79 case STRRET_OFFSETA: 80 if (pidl) 81 { 82 if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, 83 dest, len ) && len) 84 dest[len-1] = 0; 85 } 86 break; 87 88 default: 89 FIXME("unknown type!\n"); 90 if (len) 91 { *(LPSTR)dest = '\0'; 92 } 93 return(FALSE); 94 } 95 return S_OK; 96 } 97 21 98 22 99 /************************************************************************* … … 28 105 * the pidl is for STRRET OFFSET 29 106 */ 30 HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)31 {32 return StrRetToBufA( src, pidl, dest, len );33 }34 35 HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)36 {37 return StrRetToBufW( src, pidl, dest, len );38 }39 40 107 HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 41 108 { … … 127 194 return OleStrToStrNA (lpOut, nOut, lpIn, nIn); 128 195 } 196 197 198 /************************************************************************* 199 * CheckEscapes [SHELL32] 200 */ 201 DWORD WINAPI CheckEscapesA( 202 LPSTR string, /* [in] string to check ??*/ 203 DWORD b, /* [???] is 0 */ 204 DWORD c, /* [???] is 0 */ 205 LPDWORD d, /* [???] is address */ 206 LPDWORD e, /* [???] is address */ 207 DWORD handle ) /* [in] looks like handle but not */ 208 { 209 FIXME("(%p<%s> %ld %ld %p<%ld> %p<%ld> 0x%08lx) stub\n", 210 string, debugstr_a(string), 211 b, 212 c, 213 d, (d) ? *d : 0xabbacddc, 214 e, (e) ? *e : 0xabbacddd, 215 handle); 216 return 0; 217 } 218 219 DWORD WINAPI CheckEscapesW( 220 LPWSTR string, /* [in] string to check ??*/ 221 DWORD b, /* [???] is 0 */ 222 DWORD c, /* [???] is 0 */ 223 LPDWORD d, /* [???] is address */ 224 LPDWORD e, /* [???] is address */ 225 DWORD handle ) /* [in] looks like handle but not */ 226 { 227 FIXME("(%p<%s> %ld %ld %p<%ld> %p<%ld> 0x%08lx) stub\n", 228 string, debugstr_w(string), 229 b, 230 c, 231 d, (d) ? *d : 0xabbacddc, 232 e, (e) ? *e : 0xabbacddd, 233 handle); 234 return 0; 235 }
Note:
See TracChangeset
for help on using the changeset viewer.