Commit c75d0cdc authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

comdlg32: Don't worry if an HGLOBAL passed to printdlg is already locked.

parent fa1d997d
......@@ -2096,14 +2096,6 @@ BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
lppd->hDevMode = GlobalAlloc(GMEM_MOVEABLE,
lpdm->dmSize + lpdm->dmDriverExtra);
} else {
WORD locks;
if((locks = (GlobalFlags(lppd->hDevMode) & GMEM_LOCKCOUNT))) {
WARN("hDevMode has %d locks on it. Unlocking it now\n", locks);
while(locks--) {
GlobalUnlock(lppd->hDevMode);
TRACE("Now got %d locks\n", locks);
}
}
lppd->hDevMode = GlobalReAlloc(lppd->hDevMode,
lpdm->dmSize + lpdm->dmDriverExtra,
GMEM_MOVEABLE);
......@@ -2111,14 +2103,6 @@ BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
lpdmReturn = GlobalLock(lppd->hDevMode);
memcpy(lpdmReturn, lpdm, lpdm->dmSize + lpdm->dmDriverExtra);
if (lppd->hDevNames != 0) {
WORD locks;
if((locks = (GlobalFlags(lppd->hDevNames) & GMEM_LOCKCOUNT))) {
WARN("hDevNames has %d locks on it. Unlocking it now\n", locks);
while(locks--)
GlobalUnlock(lppd->hDevNames);
}
}
PRINTDLG_CreateDevNames(&(lppd->hDevNames),
di->pDriverPath,
pi->pPrinterName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment