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
b7546b68
Commit
b7546b68
authored
Nov 15, 2000
by
Eric Kohl
Committed by
Alexandre Julliard
Nov 15, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New unicode support functions.
parent
8643f4e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
1 deletion
+92
-1
comctl32.h
dlls/comctl32/comctl32.h
+3
-0
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+89
-1
No files found.
dlls/comctl32/comctl32.h
View file @
b7546b68
...
...
@@ -82,5 +82,8 @@ extern HMODULE COMCTL32_hModule;
/* Internal function */
HWND
COMCTL32_CreateToolTip
(
HWND
);
INT
Str_GetPtrWtoA
(
LPCWSTR
lpSrc
,
LPSTR
lpDest
,
INT
nMaxLen
);
BOOL
Str_SetPtrAtoW
(
LPWSTR
*
lppDest
,
LPCSTR
lpSrc
);
#endif
/* __WINE_COMCTL32_H */
dlls/comctl32/comctl32undoc.c
View file @
b7546b68
/*
* Undocumented functions from COMCTL32.DLL
*
* Copyright 1998 Eric Kohl
<ekohl@abo.rhein-zeitung.de>
* Copyright 1998 Eric Kohl
* 1998 Juergen Schmied <j.schmied@metronet.de>
* 2000 Eric Kohl for CodeWeavers
*
* NOTES
* All of these functions are UNDOCUMENTED!! And I mean UNDOCUMENTED!!!!
* Do NOT rely on names or contents of undocumented structures and types!!!
...
...
@@ -814,6 +816,92 @@ Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
/**************************************************************************
* Str_GetPtrWtoA [internal]
*
* Converts a unicode string into a multi byte string
*
* PARAMS
* lpSrc [I] Pointer to the unicode source string
* lpDest [O] Pointer to caller supplied storage for the multi byte string
* nMaxLen [I] Size, in bytes, of the destination buffer
*
* RETURNS
* Length, in bytes, of the converted string.
*/
INT
Str_GetPtrWtoA
(
LPCWSTR
lpSrc
,
LPSTR
lpDest
,
INT
nMaxLen
)
{
INT
len
;
TRACE
(
"(%s %p %d)
\n
"
,
debugstr_w
(
lpSrc
),
lpDest
,
nMaxLen
);
if
(
!
lpDest
&&
lpSrc
)
return
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
0
,
0
,
NULL
,
NULL
);
if
(
nMaxLen
==
0
)
return
0
;
if
(
lpSrc
==
NULL
)
{
lpDest
[
0
]
=
'\0'
;
return
0
;
}
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
0
,
0
,
NULL
,
NULL
);
if
(
len
>=
nMaxLen
)
len
=
nMaxLen
-
1
;
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
lpDest
,
len
,
NULL
,
NULL
);
lpDest
[
len
]
=
'\0'
;
return
len
;
}
/**************************************************************************
* Str_SetPtrAtoW [internal]
*
* Converts a multi byte string to a unicode string.
* If the pointer to the destination buffer is NULL a buffer is allocated.
* If the destination buffer is too small to keep the converted multi byte
* string the destination buffer is reallocated. If the source pointer is
* NULL, the destination buffer is freed.
*
* PARAMS
* lppDest [I/O] pointer to a pointer to the destination buffer
* lpSrc [I] pointer to a multi byte string
*
* RETURNS
* TRUE: conversion successful
* FALSE: error
*/
BOOL
Str_SetPtrAtoW
(
LPWSTR
*
lppDest
,
LPCSTR
lpSrc
)
{
TRACE
(
"(%p %s)
\n
"
,
lppDest
,
lpSrc
);
if
(
lpSrc
)
{
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
NULL
,
0
);
LPWSTR
ptr
=
COMCTL32_ReAlloc
(
*
lppDest
,
len
);
if
(
!
ptr
)
return
FALSE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
ptr
,
len
);
*
lppDest
=
ptr
;
}
else
{
if
(
*
lppDest
)
{
COMCTL32_Free
(
*
lppDest
);
*
lppDest
=
NULL
;
}
}
return
TRUE
;
}
/**************************************************************************
* The DSA-API is a set of functions to create and manipulate arrays of
* fixed-size memory blocks. These arrays can store any kind of data
* (strings, icons...).
...
...
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