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
ade9fd64
Commit
ade9fd64
authored
Feb 26, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove duplicate code (use serialui instead).
parent
9258c401
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
27 deletions
+15
-27
comm.c
dlls/kernel32/comm.c
+15
-27
No files found.
dlls/kernel32/comm.c
View file @
ade9fd64
...
...
@@ -1388,35 +1388,23 @@ BOOL WINAPI GetDefaultCommConfigW(
afterwards the number of bytes copied to the buffer or
the needed size of the buffer. */
{
LPDCB
lpdcb
=
&
(
lpCC
->
dcb
);
WCHAR
temp
[
40
];
static
const
WCHAR
comW
[]
=
{
'C'
,
'O'
,
'M'
,
0
};
static
const
WCHAR
formatW
[]
=
{
'C'
,
'O'
,
'M'
,
'%'
,
'c'
,
':'
,
'3'
,
'8'
,
'4'
,
'0'
,
'0'
,
','
,
'n'
,
','
,
'8'
,
','
,
'1'
,
0
};
TRACE
(
"(%s, %p, %p) *lpdwSize: %u
\n
"
,
debugstr_w
(
lpszName
),
lpCC
,
lpdwSize
,
lpdwSize
?
*
lpdwSize
:
0
);
if
(
strncmpiW
(
lpszName
,
comW
,
3
))
{
ERR
(
"not implemented for <%s>
\n
"
,
debugstr_w
(
lpszName
));
return
FALSE
;
}
if
(
*
lpdwSize
<
sizeof
(
COMMCONFIG
))
{
*
lpdwSize
=
sizeof
(
COMMCONFIG
);
return
FALSE
;
}
*
lpdwSize
=
sizeof
(
COMMCONFIG
);
FARPROC
pGetDefaultCommConfig
;
HMODULE
hConfigModule
;
DWORD
res
=
ERROR_INVALID_PARAMETER
;
lpCC
->
dwSize
=
sizeof
(
COMMCONFIG
);
lpCC
->
wVersion
=
1
;
lpCC
->
dwProviderSubType
=
PST_RS232
;
lpCC
->
dwProviderOffset
=
0L
;
lpCC
->
dwProviderSize
=
0L
;
TRACE
(
"(%s, %p, %p) *lpdwSize: %u
\n
"
,
debugstr_w
(
lpszName
),
lpCC
,
lpdwSize
,
lpdwSize
?
*
lpdwSize
:
0
);
hConfigModule
=
LoadLibraryW
(
lpszSerialUI
);
sprintfW
(
temp
,
formatW
,
lpszName
[
3
]);
FIXME
(
"setting %s as default
\n
"
,
debugstr_w
(
temp
));
if
(
hConfigModule
)
{
pGetDefaultCommConfig
=
GetProcAddress
(
hConfigModule
,
"drvGetDefaultCommConfigW"
);
if
(
pGetDefaultCommConfig
)
{
res
=
pGetDefaultCommConfig
(
lpszName
,
lpCC
,
lpdwSize
);
}
FreeLibrary
(
hConfigModule
);
}
return
BuildCommDCBW
(
temp
,
lpdcb
);
if
(
res
)
SetLastError
(
res
);
return
(
res
==
ERROR_SUCCESS
);
}
/**************************************************************************
...
...
@@ -1443,7 +1431,7 @@ BOOL WINAPI GetDefaultCommConfigA(
if
(
lpszName
)
RtlCreateUnicodeStringFromAsciiz
(
&
lpszNameW
,
lpszName
);
else
lpszNameW
.
Buffer
=
NULL
;
if
(
lpszNameW
.
Buffer
)
ret
=
GetDefaultCommConfigW
(
lpszNameW
.
Buffer
,
lpCC
,
lpdwSize
);
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