private int ClosePrintDocument(int nres) { // close document... if (nres == SmartComm2.SM_SUCCESS) { nres = SmartComm2.SmartComm_CloseDocument((long)hsmartprinterid); } else { _eventLogger.LogError("Unable to close printer : " + nres); } return(nres); }