Changeset 6709 for trunk/src/shell32/shellstring.c
- Timestamp:
- Sep 15, 2001, 11:26:26 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shellstring.c
r6650 r6709 1 /* $Id: shellstring.c,v 1.3 2001-09-05 13:46:58 bird Exp $ */2 1 #include <string.h> 3 2 #include <stdio.h> 4 3 #include <ctype.h> 5 #include <stdlib.h> 4 #include <stdlib.h> 6 5 7 6 #include "winnls.h" … … 22 21 23 22 /************************************************************************* 24 * StrRetToStrN 25 * 23 * StrRetToStrN [SHELL32.96] 24 * 26 25 * converts a STRRET to a normal string 27 26 * … … 41 40 HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 42 41 { 43 44 45 42 if(SHELL_OsIsUnicode()) 43 return StrRetToStrNW (dest, len, src, pidl); 44 return StrRetToStrNA (dest, len, src, pidl); 46 45 } 47 46 … … 49 48 50 49 /************************************************************************ 51 * StrToOleStr[SHELL32.163]50 * StrToOleStr [SHELL32.163] 52 51 * 53 52 */ 54 53 int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString) 55 54 { 56 57 55 TRACE("(%p, %p %s)\n", 56 lpWideCharStr, lpMultiByteString, debugstr_a(lpMultiByteString)); 58 57 59 58 return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH); 60 59 61 60 } 62 61 int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString) 63 62 { 64 65 63 TRACE("(%p, %p %s)\n", 64 lpWideCharStr, lpWString, debugstr_w(lpWString)); 66 65 67 68 66 strcpyW (lpWideCharStr, lpWString ); 67 return strlenW(lpWideCharStr); 69 68 } 70 69 71 70 BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString) 72 71 { 73 74 75 72 if (SHELL_OsIsUnicode()) 73 return StrToOleStrW (lpWideCharStr, lpString); 74 return StrToOleStrA (lpWideCharStr, lpString); 76 75 } 77 76 78 77 /************************************************************************* 79 * StrToOleStrN 78 * StrToOleStrN [SHELL32.79] 80 79 * lpMulti, nMulti, nWide [IN] 81 80 * lpWide [OUT] 82 81 */ 83 BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr) 82 BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr) 84 83 { 85 86 84 TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_an(lpStrA,nStr), nStr); 85 return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide); 87 86 } 88 BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) 87 BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) 89 88 { 90 89 TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_wn(lpStrW, nStr), nStr); 91 90 92 93 94 95 91 if (lstrcpynW (lpWide, lpStrW, nWide)) 92 { return lstrlenW (lpWide); 93 } 94 return 0; 96 95 } 97 96 98 BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) 97 BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) 99 98 { 100 101 102 99 if (SHELL_OsIsUnicode()) 100 return StrToOleStrNW (lpWide, nWide, lpStr, nStr); 101 return StrToOleStrNA (lpWide, nWide, lpStr, nStr); 103 102 } 104 103 105 104 /************************************************************************* 106 * OleStrToStrN 105 * OleStrToStrN [SHELL32.78] 107 106 */ 108 BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle) 107 BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle) 109 108 { 110 111 109 TRACE("(%p, %x, %s, %x)\n", lpStr, nStr, debugstr_wn(lpOle,nOle), nOle); 110 return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL); 112 111 } 113 112 114 BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) 113 BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) 115 114 { 116 115 TRACE("(%p, %x, %s, %x)\n", lpwStr, nwStr, debugstr_wn(lpOle,nOle), nOle); 117 116 118 119 120 121 117 if (lstrcpynW ( lpwStr, lpOle, nwStr)) 118 { return lstrlenW (lpwStr); 119 } 120 return 0; 122 121 } 123 122 124 BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) 123 BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) 125 124 { 126 127 128 125 if (SHELL_OsIsUnicode()) 126 return OleStrToStrNW (lpOut, nOut, lpIn, nIn); 127 return OleStrToStrNA (lpOut, nOut, lpIn, nIn); 129 128 }
Note:
See TracChangeset
for help on using the changeset viewer.