PrintingDevice.UpdateDevMode Method (Typed) |
Note: This API is now obsolete.
Namespace: XSharp.VO.SDK
1oPD is assumed to be a PrintingDevice object. 2LOCAL structDevMode AS _WINDEVMODE // AS allocates memory for 3// the pointer not the structure 4structDevMode := oPD:GetDevMode() // map printing devices devmode 5// structure 6structDevMode.dmCopies := 10 7structDevMode.dmOrientation := DMORIENT_PORTRAIT 8lSuccess := oPD:UpdateDevMode() 9IF !lSuccess 10? "Error updating devmode" 11ELSE 12? "devmode updated successfully" 13ENDIF 14InKey(0) 15// destroy printer object (reclaim GDI resources) 16oP:Destroy() 17FUNCTION ShowValue(uValue) 18IF IsArray(uValue) 19AEval(uValue, {|u| ShowValue(u)}) // recurse until 20// single element found 21ELSEIF IsNumeric(uValue) .AND. uValue = CAPABILITY_NOT_AVAIALBLE 22QOut("Device capability not available from driver") 23ELSE 24QOut(uValue) 25ENDIF