CreateNumericContainerEnum example for Delphi
procedure TForm1.btnCreateNumericContainerEnumClick(Sender: TObject);
var
twCap: TW_CAPABILITY;
uItem: Array [ 0..2 ] of TW_UINT16;
begin
FillMemory ( @twCap, sizeof(TW_CAPABILITY), 0 );
twCap.Cap:= ICAP_XFERMECH;
twCap.ConType:= TWON_ENUMERATION;
uItem[0]:= TWSX_FILE;
uItem[1]:= TWSX_MEMORY;
uItem[2]:= TWSX_NATIVE;
LEADTwain1.CreateNumericContainerEnum ( @twCap, TWAINNUMERICTYPE_TW_UINT32, 3, TWSX_MEMORY, TWSX_NATIVE, L_PVOID(@uItem) );
LEADTwain1.SetCapability ( @twCap, LTWAIN_CAPABILITY_SET );
LEADTwain1.FreeContainer ( @twCap );
end;