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
d71bc33c
Commit
d71bc33c
authored
Oct 18, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix port enumeration.
parent
6e8f4f3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
info.c
dlls/winspool/info.c
+10
-4
No files found.
dlls/winspool/info.c
View file @
d71bc33c
...
...
@@ -3010,6 +3010,7 @@ static BOOL WINSPOOL_ComPortExists( LPCSTR name )
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
TRACE
(
"Checking %s exists
\n
"
,
name
);
CloseHandle
(
handle
);
return
TRUE
;
}
...
...
@@ -3040,6 +3041,7 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE buffer,DWORD bufsize,
DWORD
info_size
,
ofs
,
i
,
printer_count
,
serial_count
,
count
,
n
,
r
;
const
LPCSTR
szPrinterPortKey
=
"Software
\\
Wine
\\
Wine
\\
Config
\\
spooler"
;
HKEY
hkey_printer
;
BOOL
retval
=
TRUE
;
TRACE
(
"(%s,%ld,%p,%ld,%p,%p)
\n
"
,
name
,
level
,
buffer
,
bufsize
,
bufneeded
,
bufreturned
);
...
...
@@ -3088,6 +3090,8 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE buffer,DWORD bufsize,
portname
[
3
]
=
'1'
+
i
;
if
(
!
WINSPOOL_ComPortExists
(
portname
))
continue
;
TRACE
(
"Found %s
\n
"
,
portname
);
vallen
=
strlen
(
portname
);
}
else
...
...
@@ -3125,10 +3129,12 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE buffer,DWORD bufsize,
/* add the name of the port if we can fit it */
if
(
ofs
<
bufsize
)
lstrcpynA
(
&
buffer
[
ofs
],
portname
,
bufsize
-
ofs
);
}
n
++
;
}
else
retval
=
FALSE
;
ofs
+=
lstrlenA
(
portname
)
+
1
;
n
++
;
}
RegCloseKey
(
hkey_printer
);
...
...
@@ -3137,9 +3143,9 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE buffer,DWORD bufsize,
*
bufneeded
=
ofs
;
if
(
bufreturned
)
*
bufreturned
=
count
;
*
bufreturned
=
n
;
return
TRUE
;
return
retval
;
}
...
...
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