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
5ce2dfca
Commit
5ce2dfca
authored
Nov 17, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Implement IMultiLanguage2::ConvertStringInIStream.
parent
1e02c1c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
mlang.c
dlls/mlang/mlang.c
+36
-2
No files found.
dlls/mlang/mlang.c
View file @
5ce2dfca
...
...
@@ -2772,8 +2772,42 @@ static HRESULT WINAPI fnIMultiLanguage2_ConvertStringInIStream(
IStream
*
pstmIn
,
IStream
*
pstmOut
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
char
*
src
,
*
dst
=
NULL
;
INT
srclen
,
dstlen
;
STATSTG
stat
;
HRESULT
hr
;
TRACE
(
"%p %0x8 %s %u %u %p %p
\n
"
,
pdwMode
,
dwFlag
,
debugstr_w
(
lpFallBack
),
dwSrcEncoding
,
dwDstEncoding
,
pstmIn
,
pstmOut
);
FIXME
(
"dwFlag and lpFallBack not handled
\n
"
);
hr
=
IStream_Stat
(
pstmIn
,
&
stat
,
STATFLAG_NONAME
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
stat
.
cbSize
.
QuadPart
>
MAXLONG
)
return
E_INVALIDARG
;
if
(
!
(
src
=
HeapAlloc
(
GetProcessHeap
(),
0
,
stat
.
cbSize
.
QuadPart
)))
return
E_OUTOFMEMORY
;
hr
=
IStream_Read
(
pstmIn
,
src
,
stat
.
cbSize
.
QuadPart
,
(
ULONG
*
)
&
srclen
);
if
(
FAILED
(
hr
))
goto
exit
;
hr
=
ConvertINetString
(
pdwMode
,
dwSrcEncoding
,
dwDstEncoding
,
src
,
&
srclen
,
NULL
,
&
dstlen
);
if
(
FAILED
(
hr
))
goto
exit
;
if
(
!
(
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dstlen
)))
{
hr
=
E_OUTOFMEMORY
;
goto
exit
;
}
hr
=
ConvertINetString
(
pdwMode
,
dwSrcEncoding
,
dwDstEncoding
,
src
,
&
srclen
,
dst
,
&
dstlen
);
if
(
FAILED
(
hr
))
goto
exit
;
hr
=
IStream_Write
(
pstmOut
,
dst
,
dstlen
,
NULL
);
exit:
HeapFree
(
GetProcessHeap
(),
0
,
src
);
HeapFree
(
GetProcessHeap
(),
0
,
dst
);
return
hr
;
}
/*
...
...
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