BotDetect ASP Classic CAPTCHA COM API Reference

Core Captcha functionality (drawing Captcha images and generating Captcha sounds) in the BotDetect ASP Captcha component is implemented as a COM component with the BotDetect.Captcha.4 ProgId. The BotDetect Classic ASP Captcha library uses the COM Captcha interface internally, and you don't have to worry about it unless you are implementing a different client for the COM component.

BotDetect.COM.ICaptchaComponent

The COM interface declaration used by the Captcha COM component.

BotDetect.COM.ICaptchaComponent Interface Reference
BotDetect.COM.ICaptchaComponent public method string GenerateCode
  • string locale
  • int codeLength
  • int codeStyle
  • string disallowedCodeSubstringsCsv

Generate a random Captcha code with the given parameter values.

  • locale is the locale string
  • codeLength is the number of characters in the Captcha code
  • codeStyle is the numeric representation of the Captcha code style, i.e. the algorithm used to generate Captcha codes from default pre-defined locale character sets
  • disallowedCodeSubstringsCsv is the user-defined collection of disallowed code substrings that will be excluded from all randomly generated Captcha codes.
BotDetect.COM.ICaptchaComponent public method string GenerateImage
  • string code
  • string locale
  • int imageStyle
  • int imageWidth
  • int imageHeight
  • int imageFormat
  • string customLightColor
  • string customDarkColor

Generate a random Captcha image with the given parameter values.

  • code is the Captcha code
  • locale is the locale string
  • imageStyle is the numeric representation of the Captcha image style, i.e. the algorithm used to render Captcha codes in images
  • imageWidth is the width of the generated Captcha image, in pixels
  • imageHeight is the height of the generated Captcha image, in pixels
  • imageFormat is the numeric representation of the image format in which the Captcha image will be generated
  • customLightColor is the optional custom dark color point, which modifies the color palette used for Captcha image drawing. Should be a Html color, i.e. specified either by name ("Red") or hex value ("#f00" or "#ff0000")
  • customDarkColor is the optional custom light color point, which modifies the color palette used for Captcha image drawing. Should be a Html color, i.e. specified either by name ("Red") or hex value ("#f00" or "#ff0000")
BotDetect.COM.ICaptchaComponent public method string GenerateSound
  • string code
  • string locale
  • int soundStyle
  • int soundFormat
  • string soundPackageFolder
  • bool testModeEnabled

Generate a random Captcha sound with the given parameter values.

  • code is the Captcha code
  • locale is the locale string
  • soundStyle is the numeric representation of the Captcha sound style, i.e. the algorithm used to pronounce Captcha codes in sounds
  • soundFormat is the numeric representation of the audio format in which the Captcha sound file will be generated
  • soundPackageFolder is the file-system location of the folder containing BotDetect pronunciation sound packages; the client application using the COM component should have read access privileges for this location
  • testModeEnabled is the boolean variable used to just return a hard-coded test.wav file with the pronunciation.
BotDetect.COM.ICaptchaComponent public method bool IsSoundAvailable
  • string locale
  • string soundPackageFolder

Check is the pronunciation sound package required for the given locale available in the sound packages folder.

  • locale is the locale string
  • soundPackageFolder is the file-system location of the folder containing BotDetect pronunciation sound packages; the client application using the COM component should have read access privileges for this location
BotDetect.COM.ICaptchaComponent public method string DefaultCaptchaHelpPage
  • string locale

Get the default Captcha help page Url for the given locale.

  • locale is the locale string
BotDetect.COM.ICaptchaComponent public method string DefaultCaptchaImageTooltip
  • string locale

Get the default Captcha image tooltip for the given locale.

  • locale is the locale string
BotDetect.COM.ICaptchaComponent public property bool IsFree License helper, telling whether the Captcha COM component instance is created by the free BotDetect version. Used to check whether to display the code example Free version information or not.
BotDetect.COM.ICaptchaComponent public property string ControlInfo Debugging helper, returning the assembly version of the Captcha COM component

BotDetect.COM.ComCaptcha

The main .NET class implementing the BotDetect COM interface. Registered for COM interop using the BotDetect.Captcha.3 ProgId.

Implementss

BotDetect.COM.ICaptchaComponent

BotDetect.COM.ComCaptcha Interface Reference
BotDetect.COM.ComCaptcha public method string GenerateCode
  • string locale
  • int codeLength
  • int codeStyle
  • string disallowedCodeSubstringsCsv

Generate a random Captcha code with the given parameter values.

  • locale is the locale string
  • codeLength is the number of characters in the Captcha code
  • codeStyle is the numeric representation of the Captcha code style, i.e. the algorithm used to generate Captcha codes from default pre-defined locale character sets
  • disallowedCodeSubstringsCsv is the user-defined collection of disallowed code substrings that will be excluded from all randomly generated Captcha codes.
BotDetect.COM.ComCaptcha public method string GenerateImage
  • string code
  • string locale
  • int imageStyle
  • int imageWidth
  • int imageHeight
  • int imageFormat
  • string customLightColor
  • string customDarkColor

Generate a random Captcha image with the given parameter values.

  • code is the Captcha code
  • locale is the locale string
  • imageStyle is the numeric representation of the Captcha image style, i.e. the algorithm used to render Captcha codes in images
  • imageWidth is the width of the generated Captcha image, in pixels
  • imageHeight is the height of the generated Captcha image, in pixels
  • imageFormat is the numeric representation of the image format in which the Captcha image will be generated
  • customLightColor is the optional custom dark color point, which modifies the color palette used for Captcha image drawing. Should be a Html color, i.e. specified either by name ("Red") or hex value ("#f00" or "#ff0000")
  • customDarkColor is the optional custom light color point, which modifies the color palette used for Captcha image drawing. Should be a Html color, i.e. specified either by name ("Red") or hex value ("#f00" or "#ff0000")
BotDetect.COM.ComCaptcha public method string GenerateSound
  • string code
  • string locale
  • int soundStyle
  • int soundFormat
  • string soundPackageFolder
  • bool testModeEnabled

Generate a random Captcha sound with the given parameter values.

  • code is the Captcha code
  • locale is the locale string
  • soundStyle is the numeric representation of the Captcha sound style, i.e. the algorithm used to pronounce Captcha codes in sounds
  • soundFormat is the numeric representation of the audio format in which the Captcha sound file will be generated
  • soundPackageFolder is the file-system location of the folder containing BotDetect pronunciation sound packages; the client application using the COM component should have read access privileges for this location
  • testModeEnabled is the boolean variable used to just return a hard-coded test.wav file with the pronunciation.
BotDetect.COM.ComCaptcha public method bool IsSoundAvailable
  • string locale
  • string soundPackageFolder

Check is the pronunciation sound package required for the given locale available in the sound packages folder.

  • locale is the locale string
  • soundPackageFolder is the file-system location of the folder containing BotDetect pronunciation sound packages; the client application using the COM component should have read access privileges for this location
BotDetect.COM.ComCaptcha public method string DefaultCaptchaHelpPage
  • string locale

Get the default Captcha help page Url for the given locale.

  • locale is the locale string
BotDetect.COM.ComCaptcha public method string DefaultCaptchaImageTooltip
  • string locale

Get the default Captcha image tooltip for the given locale.

  • locale is the locale string
BotDetect.COM.ComCaptcha public property bool IsFree License helper, telling whether the Captcha COM component instance is created by the free BotDetect version. Used to check whether to display the code example Free version information or not.
BotDetect.COM.ComCaptcha public property string ControlInfo Debugging helper, returning the assembly version of the Captcha COM component