Datalogic .NET SDK
SetParams (Method)
Syntax
public static bool SetParams(DecodeParam[] paramArray);
Description
Sets the values of one or more label programming parameters.
Parameters Table
|
Type |
Parameter |
Description |
[in] |
DecodeParam[] |
paramArray |
Array of Datalogic.API.DecodeParam structures indicating parameters to set. Each array element contains the index of a parameter to set, and its new value. |
|
|
|
|
[return] |
bool |
|
TRUE is returned on success, otherwise a false is returned. If any unsupported index is used, or if an attempt is made to set a parameter to a value outside its valid limits, none of the parameter changes will take effect, and FALSE is returned. |
[on error] |
GetLastWin32Error() |
When the method fails System.Runtime.InteropServices.Marshal.GetLastWin32Error will return an integer representation of the Datalogic.API.DecodeErrorCode enumeration. |
Example
private void btnSetMultiParam_Click(object sender, EventArgs e) { bool bSuccess = false; bool bSuccess2 = false; DecodeParam dcdParam = new DecodeParam[3];
// Setting Params and their values dcdParam[0].index = Param.CODE39_MIN_LENGTH; dcdParam[0].val = (int)3; dcdParam[1].index = Param.CODE39_MAX_LENGTH; dcdParam[1].val = (int)24; dcdParam[2].index = Param.CODE39_LEVEL; dcdParam[2].val = (int)1; // Set bSuccess = Decode.SetParams(dcdParam); }
|
See Also
DecodeParam (Struct), System.Runtime.InteropServices.Marshal.GetLastWin32Error, DecodeErrorCode (Enum), Example #013.
Copyright © Datalogic ADC. All Right Reserved