private int LeaveSBSMode(int nres) { // leave sbs-mode if (hsmartprinterid != 0) { Int32 nres2; nres2 = SmartComm2.SmartComm_SBSEnd((long)hsmartprinterid); if (nres == SmartComm2.SM_SUCCESS) { nres = nres2; } } return(nres); }