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
568a91df
Commit
568a91df
authored
Oct 26, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERIALUI: convert to Unicode.
parent
a8b09d11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
69 deletions
+139
-69
comm.c
dlls/kernel/comm.c
+27
-24
Makefile.in
dlls/serialui/Makefile.in
+1
-0
confdlg.c
dlls/serialui/confdlg.c
+104
-41
serialui.spec
dlls/serialui/serialui.spec
+7
-4
No files found.
dlls/kernel/comm.c
View file @
568a91df
...
...
@@ -2098,7 +2098,8 @@ BOOL WINAPI GetCommProperties(
* The DLL should be loaded when the COMM port is opened, and closed
* when the COMM port is closed. - MJM 20 June 2000
***********************************************************************/
static
CHAR
lpszSerialUI
[]
=
"serialui.dll"
;
static
WCHAR
lpszSerialUI
[]
=
{
's'
,
'e'
,
'r'
,
'i'
,
'a'
,
'l'
,
'u'
,
'i'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
/***********************************************************************
...
...
@@ -2129,7 +2130,7 @@ BOOL WINAPI CommConfigDialogA(
TRACE
(
"(%p %p %p)
\n
"
,
lpszDevice
,
hWnd
,
lpCommConfig
);
hConfigModule
=
LoadLibrary
A
(
lpszSerialUI
);
hConfigModule
=
LoadLibrary
W
(
lpszSerialUI
);
if
(
!
hConfigModule
)
return
FALSE
;
...
...
@@ -2140,7 +2141,7 @@ BOOL WINAPI CommConfigDialogA(
r
=
lpfnCommDialog
(
lpszDevice
,
hWnd
,
lpCommConfig
);
/* UnloadLibrary(hConfigModule); */
FreeLibrary
(
hConfigModule
);
return
r
;
}
...
...
@@ -2236,29 +2237,26 @@ BOOL WINAPI SetCommConfig(
*
* True if the device was found and the defaults set, false otherwise
*/
BOOL
WINAPI
SetDefaultCommConfig
A
(
LPC
STR
lpszDevice
,
/* [in] The ascii name of the device targeted for configuration. */
BOOL
WINAPI
SetDefaultCommConfig
W
(
LPC
WSTR
lpszDevice
,
/* [in] The ascii name of the device targeted for configuration. */
LPCOMMCONFIG
lpCommConfig
,
/* [in] The default configuration for the device. */
DWORD
dwSize
)
/* [in] The number of bytes in the configuration structure. */
{
FARPROC
lpfnSetDefaultCommConfig
;
HMODULE
hConfigModule
;
BOOL
r
;
BOOL
r
=
FALSE
;
TRACE
(
"(%p %p %lx)
\n
"
,
lpszDevice
,
lpCommConfig
,
dwSize
);
hConfigModule
=
LoadLibrary
A
(
lpszSerialUI
);
hConfigModule
=
LoadLibrary
W
(
lpszSerialUI
);
if
(
!
hConfigModule
)
return
FALSE
;
return
r
;
lpfnSetDefaultCommConfig
=
GetProcAddress
(
hConfigModule
,
(
LPCSTR
)
4L
);
lpfnSetDefaultCommConfig
=
GetProcAddress
(
hConfigModule
,
"drvSetDefaultCommConfigW"
);
if
(
lpfnSetDefaultCommConfig
)
r
=
lpfnSetDefaultCommConfig
(
lpszDevice
,
lpCommConfig
,
dwSize
);
if
(
!
lpfnSetDefaultCommConfig
)
return
TRUE
;
r
=
lpfnSetDefaultCommConfig
(
lpszDevice
,
lpCommConfig
,
dwSize
);
/* UnloadLibrary(hConfigModule); */
FreeLibrary
(
hConfigModule
);
return
r
;
}
...
...
@@ -2273,21 +2271,26 @@ BOOL WINAPI SetDefaultCommConfigA(
* RETURNS
*
*/
BOOL
WINAPI
SetDefaultCommConfig
W
(
LPC
WSTR
lpszDevice
,
/* [in] The unicode name of the device targeted for configuration. */
BOOL
WINAPI
SetDefaultCommConfig
A
(
LPC
STR
lpszDevice
,
/* [in] The unicode name of the device targeted for configuration. */
LPCOMMCONFIG
lpCommConfig
,
/* [in] The default configuration for the device. */
DWORD
dwSize
)
/* [in] The number of bytes in the configuration structure. */
{
BOOL
r
;
LPSTR
lpDeviceA
;
LPWSTR
lpDeviceW
=
NULL
;
DWORD
len
;
TRACE
(
"(%s %p %lx)
\n
"
,
debugstr_
w
(
lpszDevice
),
lpCommConfig
,
dwSize
);
TRACE
(
"(%s %p %lx)
\n
"
,
debugstr_
a
(
lpszDevice
),
lpCommConfig
,
dwSize
);
lpDeviceA
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
lpszDevice
);
if
(
lpDeviceA
)
return
FALSE
;
r
=
SetDefaultCommConfigA
(
lpDeviceA
,
lpCommConfig
,
dwSize
);
HeapFree
(
GetProcessHeap
(),
0
,
lpDeviceA
);
if
(
lpszDevice
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszDevice
,
-
1
,
NULL
,
0
);
lpDeviceW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszDevice
,
-
1
,
lpDeviceW
,
len
);
}
r
=
SetDefaultCommConfigW
(
lpDeviceW
,
lpCommConfig
,
dwSize
);
if
(
lpDeviceW
)
HeapFree
(
GetProcessHeap
(),
0
,
lpDeviceW
);
return
r
;
}
...
...
dlls/serialui/Makefile.in
View file @
568a91df
...
...
@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
serialui.dll
IMPORTS
=
user32 advapi32 kernel32
EXTRALIBS
=
$(LIBUNICODE)
C_SRCS
=
\
confdlg.c
...
...
dlls/serialui/confdlg.c
View file @
568a91df
This diff is collapsed.
Click to expand it.
dlls/serialui/serialui.spec
View file @
568a91df
2 stdcall EnumPropPages(ptr ptr ptr) SERIALUI_EnumPropPages
3 stdcall drvCommConfigDialog(ptr long ptr) SERIALUI_CommConfigDialog
4 stdcall drvSetDefaultCommConfig(str ptr long) SERIALUI_SetDefaultCommConfig
5 stdcall drvGetDefaultCommConfig(str ptr ptr) SERIALUI_GetDefaultCommConfig
1 stdcall EnumPropPages(ptr ptr ptr)
2 stdcall drvCommConfigDialogW(ptr long ptr)
3 stdcall drvCommConfigDialogA(ptr long ptr)
4 stdcall drvSetDefaultCommConfigW(wstr ptr long)
5 stdcall drvSetDefaultCommConfigA(str ptr long)
6 stdcall drvGetDefaultCommConfigW(wstr ptr ptr)
7 stdcall drvGetDefaultCommConfigA(str ptr ptr)
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