GetUniqueOptionsSupported() example

GetUniqueOptionsSupported() example

  1. bool PluginMain::GetUniqueOptionsSupported(CString DeviceId, CString & XML)
  2. {
  3.   PluginCallLogger LogCall("PluginMain::GetUniqueOptionsSupported(\"%s\", ...)", (LPCSTR)DeviceId);
  4.     //if our base class is not happy with this call...
  5.   if (PluginBase::GetUniqueOptionsSupported(DeviceId, XML) != true) 
  6.     return false;

  7.   XmlFileInfo XmlWriter;
  8.   CString XmlPathTop;
  9.   CString XmlSectionPath;   
  10.   CString XmlValuePath;   
  11.    
  12.   XmlWriter.Clear();  //clear values
  13.   XmlWriter.AddContainer("/UniqueOptions", XmlPathTop);
  14.  
  15.   XmlWriter.AddContainer(XmlPathTop + "/Imaging", XmlSectionPath);        //add image option section
  16.  
  17.   XmlWriter.AddContainer(XmlSectionPath + "/GrayscaleAndColorResolution", XmlValuePath);    //value name
  18.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Grayscale/Color Resolution"); 
  19.   XmlWriter.AddValue(XmlValuePath, "ValueType", "List"); 
  20.   XmlWriter.AddValue(XmlValuePath, "Values", "100,200,240,300");
  21.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "100");   //the default resolution for grayscale and color images should be 100 dpi
  22.   XmlWriter.AddValue(XmlValuePath, "Help", "Resolution for both grayscale and color images in dots per inch."); 
  23.   XmlWriter.AddContainer(XmlSectionPath + "/Brightness", XmlValuePath);    //value name
  24.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Image Brightness"); 
  25.   XmlWriter.AddValue(XmlValuePath, "ValueType", "Range"); 
  26.   XmlWriter.AddValue(XmlValuePath, "Values", "0-255,1");  //0 to 255, increment = 1
  27.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "128");
  28.   XmlWriter.AddValue(XmlValuePath, "Help", "Brightness of the image. Higher values make the image lighter."); 
  29.  
  30.   XmlWriter.AddContainer(XmlSectionPath + "/FrontJpegQuality", XmlValuePath);    //value name
  31.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Front JPEG Quality"); 
  32.   XmlWriter.AddValue(XmlValuePath, "ValueType", "Range"); 
  33.   XmlWriter.AddValue(XmlValuePath, "Values", "5-95,1");  //5 to 95, increment = 1
  34.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "75");
  35.   XmlWriter.AddValue(XmlValuePath, "Help", "Higher values yield a higher image quality."); 
  36.  
  37.   XmlWriter.AddContainer(XmlSectionPath + "/RearJpegQuality", XmlValuePath);    //value name
  38.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Rear JPEG Quality"); 
  39.   XmlWriter.AddValue(XmlValuePath, "ValueType", "Range"); 
  40.   XmlWriter.AddValue(XmlValuePath, "Values", "5-95,1");  //5 to 95, increment = 1
  41.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "75");
  42.   XmlWriter.AddValue(XmlValuePath, "Help", "Higher values yield a higher image quality.");   
  43.    
  44.   XmlWriter.Write(XML);
  45.   return true;
  46. }

Ranger® - The universal check scanner interface
Copyright © 2023 Silver Bullet Technology
www.sbullet.com

    • Related Articles

    • Should Ranger call my GetUniqueOptionsSupported() function?

      No, Ranger does not call GetUniqueOptionsSupported(). However, applications such as RangerFlex may call this function to determine which unique options are available. Ranger® - The universal check scanner interface Copyright © 2023 Silver Bullet ...
    • Local Network Access Permission: Browser Requirements for Ranger Remote (2026)

      A number of browsers, including Chrome, Edge, Firefox are gradually introducing stricter permission requirements for web applications and websites that access the local network and user devices. Going forward, users may be prompted by their browser ...
    • How can I install Ranger Remote using the Command Prompt?

      You have the option of installing Ranger Remote through the Command Prompt with the following options: To install silently, use the option "/S" To install with WebSocket Secure (WSS) enabled, use the option "/WSS" To install with auto-start on PC ...
    • Can you provide a Ranger portability overview?

      Ranger provides a common ActiveX control and/or DLL interface for all scanners that we support. See: Production versions of Ranger After the scanner powers up, Ranger creates an INI file that describes the features of the attached check scanner. For ...
    • Why can I not view tiff images from Ranger in the Windows XP operating system?

      The image viewer in Windows XP will not display JPEG (in TIFF) images. Options for working around this issue include the use of another image viewer that supports this image type or changing the image format used for grayscale images. IrfanView is an ...