summaryrefslogtreecommitdiff
path: root/src/pal/src/misc/strutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/misc/strutil.cpp')
-rw-r--r--src/pal/src/misc/strutil.cpp54
1 files changed, 2 insertions, 52 deletions
diff --git a/src/pal/src/misc/strutil.cpp b/src/pal/src/misc/strutil.cpp
index ddeef0680d..e0f2cb25f2 100644
--- a/src/pal/src/misc/strutil.cpp
+++ b/src/pal/src/misc/strutil.cpp
@@ -35,13 +35,11 @@ Function:
as necessary
Parameters:
- pthr -- thread data for calling thread
psSource -- the string to copy from
--*/
PAL_ERROR
CPalString::CopyString(
- CPalThread *pthr,
CPalString *psSource
)
{
@@ -50,7 +48,7 @@ CPalString::CopyString(
_ASSERTE(NULL != psSource);
_ASSERTE(NULL == m_pwsz);
_ASSERTE(0 == m_dwStringLength);
- _ASSERTE(0 == m_dwMaxLength);
+ _ASSERTE(0 == m_dwMaxLength);
if (0 != psSource->GetStringLength())
{
@@ -63,7 +61,7 @@ CPalString::CopyString(
if (NULL != pwsz)
{
_ASSERTE(NULL != psSource->GetString());
-
+
CopyMemory(
pwsz,
psSource->GetString(),
@@ -102,51 +100,3 @@ CPalString::FreeBuffer(
InternalFree(const_cast<WCHAR*>(m_pwsz));
}
-
-/*++
-Function:
- InternalWszNameFromSzName
-
- Helper function to convert an ANSI string object name parameter to a
- unicode string
-
-Parameters:
- pthr -- thread data for calling thread
- pszName -- the ANSI string name
- pwszName -- on success, receives the converted unicode string
- cch -- the size of pwszName, in characters
---*/
-
-PAL_ERROR
-CorUnix::InternalWszNameFromSzName(
- CPalThread *pthr,
- LPCSTR pszName,
- LPWSTR pwszName,
- DWORD cch
- )
-{
- PAL_ERROR palError = NO_ERROR;
-
- _ASSERTE(NULL != pthr);
- _ASSERTE(NULL != pszName);
- _ASSERTE(NULL != pwszName);
- _ASSERTE(0 < cch);
-
- if (MultiByteToWideChar(CP_ACP, 0, pszName, -1, pwszName, cch) == 0)
- {
- palError = pthr->GetLastError();
- if (ERROR_INSUFFICIENT_BUFFER == palError)
- {
- ERROR("pszName is larger than cch (%d)!\n", palError);
- palError = ERROR_FILENAME_EXCED_RANGE;
- }
- else
- {
- ERROR("MultiByteToWideChar failure! (error=%d)\n", palError);
- palError = ERROR_INVALID_PARAMETER;
- }
- }
-
- return palError;
-}
-