Datalogic .NET SDK

SetParam (Method)

 

Syntax

 

public static bool SetParam(Int32 index, Int32 val);

 

 

Class                           : Decode

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Sets the value of a single label programming parameter.

 

 

Parameters Table

 

Type

Parameter

Description

[in]

Int32

index

The index of the label programming parameter to set.

[in]

Int32

val

The new value of the parameter.

 

 

 

 

[return]

bool

 

True is returned on success, otherwise false is returned. A false will be returned if an unsupported index is used, or if an attempt is made to set a parameter to a value outside its valid limits.

[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 button1_Click(object sender, EventArgs e)

   {

      Int32 ValueToSet = 12;

      Int32 ValueRead  = 0;

      bool bSuccess    = false;

     

      bSuccess  = Decode.SetParam(Param.CODE39_MAX_LENGTH, ValueToSet);                 

      ValueRead = Decode.GetParam(Param.CODE39_MAX_LENGTH);

   }

 

 

 

Remarks

At this moment such method is supported only for backward compatibility then we encourage the use of Datalogic.API.Decode.SetParamString instead.

 

 

See Also

System.Runtime.InteropServices.Marshal.GetLastWin32Error, DecodeErrorCode (Enum), Decode.SetParamString (Method), Decode.GetParamString (Method), Example #012.

 

 

Copyright © Datalogic ADC. All Right Reserved