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
7aa56d24
Commit
7aa56d24
authored
Aug 30, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Don't try to convert NULL pointers.
parent
df84eb51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
regproc.c
programs/regedit/regproc.c
+20
-12
No files found.
programs/regedit/regproc.c
View file @
7aa56d24
...
...
@@ -70,13 +70,17 @@ if (!(p)) \
*/
WCHAR
*
GetWideString
(
const
char
*
strA
)
{
WCHAR
*
strW
=
NULL
;
int
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
strA
,
-
1
,
NULL
,
0
);
if
(
strA
)
{
WCHAR
*
strW
=
NULL
;
int
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
strA
,
-
1
,
NULL
,
0
);
strW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
CHECK_ENOUGH_MEMORY
(
strW
);
MultiByteToWideChar
(
CP_ACP
,
0
,
strA
,
-
1
,
strW
,
len
);
return
strW
;
strW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
CHECK_ENOUGH_MEMORY
(
strW
);
MultiByteToWideChar
(
CP_ACP
,
0
,
strA
,
-
1
,
strW
,
len
);
return
strW
;
}
return
NULL
;
}
/******************************************************************************
...
...
@@ -85,13 +89,17 @@ WCHAR* GetWideString(const char* strA)
*/
char
*
GetMultiByteString
(
const
WCHAR
*
strW
)
{
char
*
strA
=
NULL
;
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
strW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
strW
)
{
char
*
strA
=
NULL
;
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
strW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
strA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
CHECK_ENOUGH_MEMORY
(
strA
);
WideCharToMultiByte
(
CP_ACP
,
0
,
strW
,
-
1
,
strA
,
len
,
NULL
,
NULL
);
return
strA
;
strA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
CHECK_ENOUGH_MEMORY
(
strA
);
WideCharToMultiByte
(
CP_ACP
,
0
,
strW
,
-
1
,
strA
,
len
,
NULL
,
NULL
);
return
strA
;
}
return
NULL
;
}
/******************************************************************************
...
...
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