UploadPadResourceFileByName

Declaration

Delphi (DLL)

function UploadPadResourceFileByName(ResourceName: ShortString; FilePathOrData: PAnsiChar; WParam:DWORD; LParam:DWORD): integer; register;

C/C++ (DLL)
SOPAD_API int SOPAD_UploadPadResourceFileByName(char *ResourceName, char* FilePathOrData, DWORD WParam, DWORD LParam);

ActiveX
HRESULT _stdcall UploadPadResourceFileByName([in] BSTR ResourceName, [in] long WParam, [in] long LParam, [in] BSTR FilePathOrData, [out, retval] long* Result);

Description

UploadPadResourceFileByName uploads resource to pad file system. Image Ressourcen needs to be compressed/converted by the DeviceAPI as the Device Firmware doesn´t support JPG/PNG/BMP Images directly. The Device Firmware allows to change the following ressources. If you use UploadPadResourceFileByName to upload a ressource file which already exist on the device, the old file will be replaced, it´s not necessary to remove a ressource if you want to update it.

NameExtensionPad TypeDescription

PromoScreenN

(sample: PromoScreen1.soi, PromoScreen2.soi,...)

.soi / .img

Colour, Flawless, Comfort (img extension)

Brilliance (soi extension)

The device can store 4 up to Promoscreens. They will be showed in a slideshow in order of the name. Older Devices/Firmware will interrupt the slideshow in case a Promoscreen is missing. For example if PromoScreen1, 3 and 4 is stored on the device, the Pad shows only the first image and will skip the others.

The Img format is outdated and is replaced by soi with newer Firmware versions. It´s possible that both extension types are stored on the device, in that case only the SOI will be used.

PromoScreenNO

(sample: PromoScreen1L.soi, PromoScreen2P.soi,...)

.soi10.0 PadFor the 10" pad you also need to upload the PromoScreen with orientations. For landscape (0/180°) you need extend the filename with an L (like PromoScreen1L.soi) and for portrait (90/270°) you need to extend the filename with an P (like PromoScreen1P.soi).

PromoScreen

(PromoScreen.cfg)

cfg

10.0 Pad / Brilliance

Config file for the PromoScreens which contains the delay options. Supported only with latest Firmware of 10.0 and Brilliance Pad (not supported by Colour, Flawless and Comfort Pads)
    

SignInfoBg

(for 10" Device SignInfoBgL and SignInfoBgP has to use)

.soi / .imgColour, Brilliance, Flawless, Comfort Background image for the Standard Signature Mode (Fullscreen for Flawless/Comfort/Brilliance/10" and top of the Screen by ColourPad)

SignInfoFg

(for 10" Device SignInfoFgL and SignInfoFgP has to use)

.soi / .imgColour, Brilliance, Flawless, Comfort Foreground Image with the Flags + Texts, it´s transparent and alpha blending with the background image
SignInput.soi / .imgColourBackground image for the input area of the StepOver Colour Pad (Standard-Signature Mode)
    

ui*

(ui_customerressource.soi, ui_demo.txt)

* The firmware also allows to other images in case the filename starts with ui*

 

The PromoScreen Images will be streched/compressed in case the image size is other than the display resolution of the device.

DeviceResolution
Colour Pad640x480
Flawless/Comfort480x272
Brilliance800x480
10" - in Landscape1024x600
10" - in Portrait600x1024

Arguments

ResourceName

Name of the resource file you want to store on the device e.g. "PromoScreen1.soi"

WParam

0: resource will be handled as Image (supported image types: BMP, JPEG and PNG)
1: resource will be handeled as a binary/text file and will not be converted

LParam

Placeholder, no functionality yet

FilePathOrData

Location of the source file for the Upload

Return value

UploadPadResourceFileByName returns (SOPAD_ERROR_SUCCESS = 0) if it was possible to upload the resource to the signature device.
If uploading hasn't been started, function returns the appropriate error code. You can get extended error code with the help of GetSOPadError call.

Possible error codes are listed below: Driver error codes

See also

DownloadPadResourceFileByName

GetPadResourceFileInfoByName

GetPadResourceFileList

PromoImageOptionsDoAction

PromoImageSetOptions

RemovePadResourceFileByName

RenamePadResourceFileName

UploadPadResourceFileByName

Sample

C#
//  Upload the Promoscreen1 from the device
 
string ImageOrientation = "";
string filePath = @"c:\temp\Promoscreen1.bmp";
int ImageNumber = 1;
int uploadStatus = -1;
 
//  For 10 Ince Pad the PromoScreen needs the Orientation Info
if (radioButton_Landscape.Checked && devStatus == deviceStatus.tenInchPad)
	ImageOrientation = "L";
else if (radioButton_Portait.Checked && devStatus == deviceStatus.tenInchPad)
	ImageOrientation = "P";
 
uploadStatus = SigDev.UploadPadResourceFileByName("PromoScreen" + ImageNumber + ImageOrientation + ".soi", 0, 0, filePath);