Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f21e9c2a
Commit
f21e9c2a
authored
May 23, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
May 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Implement ConvertINetString.
parent
7b2e7cb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
mlang.c
dlls/mlang/mlang.c
+39
-2
No files found.
dlls/mlang/mlang.c
View file @
f21e9c2a
...
...
@@ -601,9 +601,46 @@ HRESULT WINAPI ConvertINetString(
LPINT
pcDstSize
)
{
FIXME
(
"%p %d %d %s %p %p %p: stub!
\n
"
,
pdwMode
,
dwSrcEncoding
,
dwDstEncoding
,
TRACE
(
"%p %d %d %s %p %p %p
\n
"
,
pdwMode
,
dwSrcEncoding
,
dwDstEncoding
,
debugstr_a
(
pSrcStr
),
pcSrcSize
,
pDstStr
,
pcDstSize
);
return
E_NOTIMPL
;
if
(
dwSrcEncoding
==
CP_UNICODE
)
{
INT
cSrcSizeW
;
if
(
pcSrcSize
&&
*
pcSrcSize
!=
-
1
)
{
cSrcSizeW
=
*
pcSrcSize
/
sizeof
(
WCHAR
);
pcSrcSize
=
&
cSrcSizeW
;
}
return
ConvertINetUnicodeToMultiByte
(
pdwMode
,
dwDstEncoding
,
(
LPCWSTR
)
pSrcStr
,
pcSrcSize
,
pDstStr
,
pcDstSize
);
}
else
if
(
dwDstEncoding
==
CP_UNICODE
)
{
HRESULT
hr
=
ConvertINetMultiByteToUnicode
(
pdwMode
,
dwSrcEncoding
,
pSrcStr
,
pcSrcSize
,
(
LPWSTR
)
pDstStr
,
pcDstSize
);
*
pcDstSize
*=
sizeof
(
WCHAR
);
return
hr
;
}
else
{
INT
cDstSizeW
;
LPWSTR
pDstStrW
;
HRESULT
hr
;
TRACE
(
"convert %s from %d to %d
\n
"
,
debugstr_a
(
pSrcStr
),
dwSrcEncoding
,
dwDstEncoding
);
hr
=
ConvertINetMultiByteToUnicode
(
pdwMode
,
dwSrcEncoding
,
pSrcStr
,
pcSrcSize
,
NULL
,
&
cDstSizeW
);
if
(
hr
!=
S_OK
)
return
hr
;
pDstStrW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cDstSizeW
*
sizeof
(
WCHAR
));
hr
=
ConvertINetMultiByteToUnicode
(
pdwMode
,
dwSrcEncoding
,
pSrcStr
,
pcSrcSize
,
pDstStrW
,
&
cDstSizeW
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
ConvertINetUnicodeToMultiByte
(
pdwMode
,
dwDstEncoding
,
pDstStrW
,
&
cDstSizeW
,
pDstStr
,
pcDstSize
);
HeapFree
(
GetProcessHeap
(),
0
,
pDstStrW
);
return
hr
;
}
}
static
HRESULT
GetFamilyCodePage
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment