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
c5b27fa9
Commit
c5b27fa9
authored
Apr 19, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Apr 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add Str_SetPtrWtoA analogue to Str_SetPtrAtoW.
parent
195ae60e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
comctl32.h
dlls/comctl32/comctl32.h
+1
-0
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+40
-0
No files found.
dlls/comctl32/comctl32.h
View file @
c5b27fa9
...
@@ -145,6 +145,7 @@ VOID COMCTL32_RefreshSysColors(void);
...
@@ -145,6 +145,7 @@ VOID COMCTL32_RefreshSysColors(void);
void
COMCTL32_DrawInsertMark
(
HDC
hDC
,
const
RECT
*
lpRect
,
COLORREF
clrInsertMark
,
BOOL
bHorizontal
);
void
COMCTL32_DrawInsertMark
(
HDC
hDC
,
const
RECT
*
lpRect
,
COLORREF
clrInsertMark
,
BOOL
bHorizontal
);
INT
Str_GetPtrWtoA
(
LPCWSTR
lpSrc
,
LPSTR
lpDest
,
INT
nMaxLen
);
INT
Str_GetPtrWtoA
(
LPCWSTR
lpSrc
,
LPSTR
lpDest
,
INT
nMaxLen
);
BOOL
Str_SetPtrAtoW
(
LPWSTR
*
lppDest
,
LPCSTR
lpSrc
);
BOOL
Str_SetPtrAtoW
(
LPWSTR
*
lppDest
,
LPCSTR
lpSrc
);
BOOL
Str_SetPtrWtoA
(
LPSTR
*
lppDest
,
LPCWSTR
lpSrc
);
#define COMCTL32_VERSION_MINOR 80
#define COMCTL32_VERSION_MINOR 80
#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0
#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0
...
...
dlls/comctl32/comctl32undoc.c
View file @
c5b27fa9
...
@@ -1107,6 +1107,46 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc)
...
@@ -1107,6 +1107,46 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc)
return
TRUE
;
return
TRUE
;
}
}
/**************************************************************************
* Str_SetPtrWtoA [internal]
*
* Converts a unicode string to a multi byte 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 wide
* 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 wide string
*
* RETURNS
* TRUE: conversion successful
* FALSE: error
*/
BOOL
Str_SetPtrWtoA
(
LPSTR
*
lppDest
,
LPCWSTR
lpSrc
)
{
TRACE
(
"(%p %s)
\n
"
,
lppDest
,
debugstr_w
(
lpSrc
));
if
(
lpSrc
)
{
INT
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
NULL
,
0
,
NULL
,
FALSE
);
LPSTR
ptr
=
ReAlloc
(
*
lppDest
,
len
*
sizeof
(
CHAR
));
if
(
!
ptr
)
return
FALSE
;
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSrc
,
-
1
,
ptr
,
len
,
NULL
,
FALSE
);
*
lppDest
=
ptr
;
}
else
{
if
(
*
lppDest
)
{
Free
(
*
lppDest
);
*
lppDest
=
NULL
;
}
}
return
TRUE
;
}
/**************************************************************************
/**************************************************************************
* Notification functions
* Notification functions
...
...
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