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
1aa5696c
Commit
1aa5696c
authored
Apr 20, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Apr 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Update the default settings when deleting the default printer.
parent
c0140118
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
info.c
dlls/winspool.drv/info.c
+14
-0
No files found.
dlls/winspool.drv/info.c
View file @
1aa5696c
...
...
@@ -2812,6 +2812,8 @@ BOOL WINAPI DeletePrinter(HANDLE hPrinter)
{
LPCWSTR
lpNameW
=
get_opened_printer_name
(
hPrinter
);
HKEY
hkeyPrinters
,
hkey
;
WCHAR
def
[
MAX_PATH
];
DWORD
size
=
sizeof
(
def
)
/
sizeof
(
def
[
0
]
);
if
(
!
lpNameW
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
...
...
@@ -2833,6 +2835,18 @@ BOOL WINAPI DeletePrinter(HANDLE hPrinter)
RegDeleteValueW
(
hkey
,
lpNameW
);
RegCloseKey
(
hkey
);
}
if
(
GetDefaultPrinterW
(
def
,
&
size
)
&&
!
strcmpW
(
def
,
lpNameW
))
{
WriteProfileStringW
(
windowsW
,
deviceW
,
NULL
);
if
(
!
RegCreateKeyW
(
HKEY_CURRENT_USER
,
user_default_reg_key
,
&
hkey
))
{
RegDeleteValueW
(
hkey
,
deviceW
);
RegCloseKey
(
hkey
);
}
SetDefaultPrinterW
(
NULL
);
}
return
TRUE
;
}
...
...
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