Проблема была решена этим фрагментом кода:
memcpy(&dm, (DEVMODE *)(psd.hDevMode), sizeof(DEVMODE));
lstrcpy(DriverName, ((TCHAR *)((BYTE *)psd.hDevNames + ((DEVNAMES *)psd.hDevNames)->wDriverOffset)));
lstrcpy(DeviceName, ((TCHAR *)((BYTE *)psd.hDevNames + ((DEVNAMES *)psd.hDevNames)->wDeviceOffset)));
lstrcpy(OutputName, ((TCHAR *)((BYTE *)psd.hDevNames + ((DEVNAMES *)psd.hDevNames)->wOutputOffset)));
HDC hDC;
hDC = CreateDC(DriverName, DeviceName, OutputName, &dm);