mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
JDK-8389509
This commit is contained in:
parent
6b590fd86d
commit
63603139bb
@ -4259,6 +4259,12 @@ static BOOL SetPrinterDevice(LPTSTR pszDeviceName, HGLOBAL* p_hDevMode,
|
||||
|
||||
// Allocate a global handle big enough to hold DEVNAMES.
|
||||
HGLOBAL hDevNames = ::GlobalAlloc(GHND, devNameSize);
|
||||
if (hDevNames == NULL) {
|
||||
::GlobalFree(hDevMode);
|
||||
::GlobalFree(p2);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DEVNAMES* pDevNames = (DEVNAMES*)::GlobalLock(hDevNames);
|
||||
|
||||
// Copy the DEVNAMES information from PRINTER_INFO_2 structure.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user