PRTQUEUE::PRTQUEUE (const PRTQUEUE& PQInfo) { mPQI3BufSize = PQInfo.mPQI3BufSize; mpPQI3 = (PRQINFO3*)malloc (mPQI3BufSize); memcpy (mpPQI3, PQInfo.mpPQI3, mPQI3BufSize);  long Diff = (long)mpPQI3 - (long)PQInfo.mpPQI3; SHIFT_PTR (mpPQI3->pszName,       Diff); SHIFT_PTR (mpPQI3->pszSepFile,    Diff); SHIFT_PTR (mpPQI3->pszPrProc,     Diff); SHIFT_PTR (mpPQI3->pszParms,      Diff); SHIFT_PTR (mpPQI3->pszComment,    Diff); SHIFT_PTR (mpPQI3->pszPrinters,   Diff); SHIFT_PTR (mpPQI3->pszDriverName, Diff); SHIFT_PTR (mpPQI3->pDriverData,   Diff);  strcpy (mDriverName, PQInfo.mDriverName); strcpy (mDeviceName, PQInfo.mDeviceName); strcpy (mPrinterName, PQInfo.mPrinterName); }
PRTQUEUE (const PRQINFO3* pPQI3)  { InitWithPQI3 (pPQI3); }
PRTQUEUE::PRTQUEUE (const PRTQUEUE& PQInfo){   mPQI3BufSize = PQInfo.mPQI3BufSize;   mpPQI3 = (PRQINFO3*)malloc (mPQI3BufSize);   memcpy (mpPQI3, PQInfo.mpPQI3, mPQI3BufSize);    // Copy entire buffer   long Diff = (long)mpPQI3 - (long)PQInfo.mpPQI3;  // Calculate the difference between addresses   SHIFT_PTR (mpPQI3->pszName,       Diff);         // Modify internal pointers accordingly   SHIFT_PTR (mpPQI3->pszSepFile,    Diff);   SHIFT_PTR (mpPQI3->pszPrProc,     Diff);   SHIFT_PTR (mpPQI3->pszParms,      Diff);   SHIFT_PTR (mpPQI3->pszComment,    Diff);   SHIFT_PTR (mpPQI3->pszPrinters,   Diff);   SHIFT_PTR (mpPQI3->pszDriverName, Diff);   SHIFT_PTR (mpPQI3->pDriverData,   Diff);   strcpy (mDriverName, PQInfo.mDriverName);   strcpy (mDeviceName, PQInfo.mDeviceName);   strcpy (mPrinterName, PQInfo.mPrinterName);}