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
14263ab0
Commit
14263ab0
authored
Jan 16, 2004
by
Vincent Béron
Committed by
Alexandre Julliard
Jan 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the implementation of GetDefaultCommConfig from A to W.
Get rid of a W->A cross call at the same time.
parent
b370abab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
22 deletions
+24
-22
comm.c
dlls/kernel/comm.c
+24
-22
No files found.
dlls/kernel/comm.c
View file @
14263ab0
...
...
@@ -2190,7 +2190,7 @@ BOOL WINAPI SetDefaultCommConfigW(
/***********************************************************************
* GetDefaultCommConfig
A
(KERNEL32.@)
* GetDefaultCommConfig
W
(KERNEL32.@)
*
* Acquires the default configuration of the specified communication device. (unicode)
*
...
...
@@ -2199,22 +2199,24 @@ BOOL WINAPI SetDefaultCommConfigW(
* True on successful reading of the default configuration,
* if the device is not found or the buffer is too small.
*/
BOOL
WINAPI
GetDefaultCommConfig
A
(
LPC
STR
lpszName
,
/* [in] The ascii
name of the device targeted for configuration. */
BOOL
WINAPI
GetDefaultCommConfig
W
(
LPC
WSTR
lpszName
,
/* [in] The unicode
name of the device targeted for configuration. */
LPCOMMCONFIG
lpCC
,
/* [out] The default configuration for the device. */
LPDWORD
lpdwSize
)
/* [in/out] Initially the size of the default configuration buffer,
afterwards the number of bytes copied to the buffer or
the needed size of the buffer. */
{
LPDCB
lpdcb
=
&
(
lpCC
->
dcb
);
char
temp
[
40
];
WCHAR
temp
[
40
];
const
WCHAR
comW
[]
=
{
'C'
,
'O'
,
'M'
,
0
};
const
WCHAR
formatW
[]
=
{
'C'
,
'O'
,
'M'
,
'%'
,
'c'
,
':'
,
'3'
,
'8'
,
'4'
,
'0'
,
'0'
,
','
,
'n'
,
','
,
'8'
,
','
,
'1'
,
0
};
if
(
strnc
asecmp
(
lpszName
,
"COM"
,
3
))
{
ERR
(
"not implemented for <%s>
\n
"
,
lpszName
);
if
(
strnc
mpiW
(
lpszName
,
comW
,
3
))
{
ERR
(
"not implemented for <%s>
\n
"
,
debugstr_w
(
lpszName
)
);
return
FALSE
;
}
TRACE
(
"(%s %p %ld)
\n
"
,
lpszName
,
lpCC
,
*
lpdwSize
);
TRACE
(
"(%s %p %ld)
\n
"
,
debugstr_w
(
lpszName
)
,
lpCC
,
*
lpdwSize
);
if
(
*
lpdwSize
<
sizeof
(
COMMCONFIG
))
{
*
lpdwSize
=
sizeof
(
COMMCONFIG
);
return
FALSE
;
...
...
@@ -2228,38 +2230,38 @@ BOOL WINAPI GetDefaultCommConfigA(
lpCC
->
dwProviderOffset
=
0L
;
lpCC
->
dwProviderSize
=
0L
;
sprintf
(
temp
,
"COM%c:38400,n,8,1"
,
lpszName
[
3
]);
FIXME
(
"setting %s as default
\n
"
,
temp
);
sprintf
W
(
temp
,
formatW
,
lpszName
[
3
]);
FIXME
(
"setting %s as default
\n
"
,
debugstr_w
(
temp
)
);
return
BuildCommDCB
A
(
temp
,
lpdcb
);
return
BuildCommDCB
W
(
temp
,
lpdcb
);
}
/**************************************************************************
* GetDefaultCommConfig
W
(KERNEL32.@)
* GetDefaultCommConfig
A
(KERNEL32.@)
*
* Acquires the default configuration of the specified communication device. (
unicode
)
* Acquires the default configuration of the specified communication device. (
ascii
)
*
* RETURNS
*
* True on successful reading of the default configuration,
* if the device is not found or the buffer is too small.
*/
BOOL
WINAPI
GetDefaultCommConfig
W
(
LPC
WSTR
lpszName
,
/* [in] The unicode
name of the device targeted for configuration. */
BOOL
WINAPI
GetDefaultCommConfig
A
(
LPC
STR
lpszName
,
/* [in] The ascii
name of the device targeted for configuration. */
LPCOMMCONFIG
lpCC
,
/* [out] The default configuration for the device. */
LPDWORD
lpdwSize
)
/* [in/out] Initially the size of the default configuration buffer,
afterwards the number of bytes copied to the buffer or
the needed size of the buffer. */
{
BOOL
ret
=
FALSE
;
LPSTR
lpszNameA
;
UNICODE_STRING
lpszNameW
;
TRACE
(
"(%
p
,%p,%ld)
\n
"
,
lpszName
,
lpCC
,
*
lpdwSize
);
lpszNameA
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
lpszName
);
if
(
lpszNameA
)
{
ret
=
GetDefaultCommConfigA
(
lpszNameA
,
lpCC
,
lpdwSize
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszNameA
);
}
TRACE
(
"(%
s
,%p,%ld)
\n
"
,
lpszName
,
lpCC
,
*
lpdwSize
);
if
(
lpszName
)
RtlCreateUnicodeStringFromAsciiz
(
&
lpszNameW
,
lpszName
);
else
lpszNameW
.
Buffer
=
NULL
;
if
(
lpszNameW
.
Buffer
)
ret
=
GetDefaultCommConfigW
(
lpszNameW
.
Buffer
,
lpCC
,
lpdwSize
);
RtlFreeUnicodeString
(
&
lpszNameW
);
return
ret
;
}
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