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