Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c59655ed
Commit
c59655ed
authored
Feb 04, 2002
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reimplement GetStringTypeA and GetStringTypeExA.
parent
4062cd92
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
codepage.c
memory/codepage.c
+40
-0
ole2nls.c
ole/ole2nls.c
+0
-0
No files found.
memory/codepage.c
View file @
c59655ed
...
...
@@ -396,3 +396,43 @@ BOOL WINAPI GetStringTypeExW( LCID locale, DWORD type, LPCWSTR src, INT count, L
/* locale is ignored for Unicode */
return
GetStringTypeW
(
type
,
src
,
count
,
chartype
);
}
/******************************************************************************
* GetStringTypeA [KERNEL32.@]
*/
BOOL
WINAPI
GetStringTypeA
(
LCID
locale
,
DWORD
type
,
LPCSTR
src
,
INT
count
,
LPWORD
chartype
)
{
char
buf
[
20
];
UINT
cp
;
INT
countW
;
LPWSTR
srcW
;
BOOL
ret
=
FALSE
;
if
(
count
==
-
1
)
count
=
strlen
(
src
)
+
1
;
if
(
!
GetLocaleInfoA
(
locale
,
LOCALE_IDEFAULTANSICODEPAGE
|
LOCALE_NOUSEROVERRIDE
,
buf
,
sizeof
(
buf
)))
{
FIXME
(
"For locale %04lx using current ANSI code page
\n
"
,
locale
);
cp
=
GetACP
();
}
else
cp
=
atoi
(
buf
);
countW
=
MultiByteToWideChar
(
cp
,
0
,
src
,
count
,
NULL
,
0
);
if
((
srcW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
countW
*
sizeof
(
WCHAR
))))
{
MultiByteToWideChar
(
cp
,
0
,
src
,
count
,
srcW
,
countW
);
ret
=
GetStringTypeW
(
type
,
srcW
,
count
,
chartype
);
HeapFree
(
GetProcessHeap
(),
0
,
srcW
);
}
return
ret
;
}
/******************************************************************************
* GetStringTypeExA [KERNEL32.@]
*/
BOOL
WINAPI
GetStringTypeExA
(
LCID
locale
,
DWORD
type
,
LPCSTR
src
,
INT
count
,
LPWORD
chartype
)
{
return
GetStringTypeA
(
locale
,
type
,
src
,
count
,
chartype
);
}
ole/ole2nls.c
View file @
c59655ed
This diff is collapsed.
Click to expand it.
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