unit Chilkat.Mime;

{
  Pascal wrapper for Chilkat Mime.
  Auto-generated by PascalWrapperGenerator -- do not edit manually.
}

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

uses
  SysUtils,
  Chilkat.Base;

type

  { TMime wraps CkMime via the C bridge layer. }
  TMime = class(TChilkatBase)
  private
    function  GetLastErrorHtml: string;
    function  GetLastErrorText: string;
    function  GetLastErrorXml: string;
    function  GetVersion: string;
    function  GetDebugLogFilePath: string;
    procedure SetDebugLogFilePath(AValue: string);
    function  GetVerboseLogging: Boolean;
    procedure SetVerboseLogging(AValue: Boolean);
    function  GetLastMethodSuccess: Boolean;
    procedure SetLastMethodSuccess(AValue: Boolean);
    function  GetBoundary: string;
    procedure SetBoundary(AValue: string);
    function  GetCharset: string;
    procedure SetCharset(AValue: string);
    function  GetContentType: string;
    procedure SetContentType(AValue: string);
    function  GetCurrentDateTime: string;
    function  GetDisposition: string;
    procedure SetDisposition(AValue: string);
    function  GetEncoding: string;
    procedure SetEncoding(AValue: string);
    function  GetFilename: string;
    procedure SetFilename(AValue: string);
    function  GetMicalg: string;
    procedure SetMicalg(AValue: string);
    function  GetName: string;
    procedure SetName(AValue: string);
    function  GetNumHeaderFields: Integer;
    function  GetNumParts: Integer;
    function  GetNumSignerCerts: Integer;
    function  GetPkcs7CryptAlg: string;
    procedure SetPkcs7CryptAlg(AValue: string);
    function  GetPkcs7KeyLength: Integer;
    procedure SetPkcs7KeyLength(AValue: Integer);
    function  GetProtocol: string;
    procedure SetProtocol(AValue: string);
    function  GetSigningHashAlg: string;
    procedure SetSigningHashAlg(AValue: string);
    function  GetUnwrapExtras: Boolean;
    procedure SetUnwrapExtras(AValue: Boolean);
    function  GetUseMmDescription: Boolean;
    procedure SetUseMmDescription(AValue: Boolean);
    function  GetUseXPkcs7: Boolean;
    procedure SetUseXPkcs7(AValue: Boolean);
    function  GetSigningAlg: string;
    procedure SetSigningAlg(AValue: string);
    function  GetOaepHash: string;
    procedure SetOaepHash(AValue: string);
    function  GetOaepPadding: Boolean;
    procedure SetOaepPadding(AValue: Boolean);
    function  GetOaepMgfHash: string;
    procedure SetOaepMgfHash(AValue: string);
    function  GetCmsOptions: string;
    procedure SetCmsOptions(AValue: string);
    function  GetUncommonOptions: string;
    procedure SetUncommonOptions(AValue: string);
    function  GetNumDecryptCerts: Integer;
  public
    constructor Create;
    destructor  Destroy; override;

    property LastErrorHtml: string read GetLastErrorHtml;
    property LastErrorText: string read GetLastErrorText;
    property LastErrorXml: string read GetLastErrorXml;
    property Version: string read GetVersion;
    property DebugLogFilePath: string read GetDebugLogFilePath write SetDebugLogFilePath;
    property VerboseLogging: Boolean read GetVerboseLogging write SetVerboseLogging;
    property LastMethodSuccess: Boolean read GetLastMethodSuccess write SetLastMethodSuccess;
    property Boundary: string read GetBoundary write SetBoundary;
    property Charset: string read GetCharset write SetCharset;
    property ContentType: string read GetContentType write SetContentType;
    property CurrentDateTime: string read GetCurrentDateTime;
    property Disposition: string read GetDisposition write SetDisposition;
    property Encoding: string read GetEncoding write SetEncoding;
    property Filename: string read GetFilename write SetFilename;
    property Micalg: string read GetMicalg write SetMicalg;
    property Name: string read GetName write SetName;
    property NumHeaderFields: Integer read GetNumHeaderFields;
    property NumParts: Integer read GetNumParts;
    property NumSignerCerts: Integer read GetNumSignerCerts;
    property Pkcs7CryptAlg: string read GetPkcs7CryptAlg write SetPkcs7CryptAlg;
    property Pkcs7KeyLength: Integer read GetPkcs7KeyLength write SetPkcs7KeyLength;
    property Protocol: string read GetProtocol write SetProtocol;
    property SigningHashAlg: string read GetSigningHashAlg write SetSigningHashAlg;
    property UnwrapExtras: Boolean read GetUnwrapExtras write SetUnwrapExtras;
    property UseMmDescription: Boolean read GetUseMmDescription write SetUseMmDescription;
    property UseXPkcs7: Boolean read GetUseXPkcs7 write SetUseXPkcs7;
    property SigningAlg: string read GetSigningAlg write SetSigningAlg;
    property OaepHash: string read GetOaepHash write SetOaepHash;
    property OaepPadding: Boolean read GetOaepPadding write SetOaepPadding;
    property OaepMgfHash: string read GetOaepMgfHash write SetOaepMgfHash;
    property CmsOptions: string read GetCmsOptions write SetCmsOptions;
    property UncommonOptions: string read GetUncommonOptions write SetUncommonOptions;
    property NumDecryptCerts: Integer read GetNumDecryptCerts;

    procedure AddContentLength;
    function  AddDecryptCert(cert: TChilkatBase): Boolean;
    function  AddDetachedSignature(cert: TChilkatBase): Boolean;
    function  AddDetachedSignature2(cert: TChilkatBase; transferHeaderFields: Boolean): Boolean;
    function  AddDetachedSignaturePk(cert: TChilkatBase; privateKey: TChilkatBase): Boolean;
    function  AddDetachedSignaturePk2(cert: TChilkatBase; privateKey: TChilkatBase; transferHeaderFields: Boolean): Boolean;
    function  AddEncryptCert(cert: TChilkatBase): Boolean;
    function  AddHeaderField(const name: string; const value: string): Boolean;
    function  AddPfxSourceFile(const pfxFilePath: string; const password: string): Boolean;
    function  AppendPart(mime: TChilkatBase): Boolean;
    function  AppendPartFromFile(const filename: string): Boolean;
    function  AsnBodyToXml: string;
    procedure ClearEncryptCerts;
    function  ContainsEncryptedParts: Boolean;
    function  ContainsSignedParts: Boolean;
    procedure Convert8Bit;
    function  ConvertToMultipartAlt: Boolean;
    function  ConvertToMultipartMixed: Boolean;
    function  ConvertToSigned(cert: TChilkatBase): Boolean;
    function  ConvertToSignedPk(cert: TChilkatBase; privateKey: TChilkatBase): Boolean;
    function  Decrypt: Boolean;
    function  Decrypt2(cert: TChilkatBase; privateKey: TChilkatBase): Boolean;
    function  DecryptUsingCert(cert: TChilkatBase): Boolean;
    function  DecryptUsingPfxFile(const pfxFilePath: string; const pfxPassword: string): Boolean;
    function  Encrypt(cert: TChilkatBase): Boolean;
    function  EncryptN: Boolean;
    function  GetBodyDecoded: string;
    function  GetBodyEncoded: string;
    function  GetEntireBody: string;
    function  GetEntireHead: string;
    function  GetHeaderField(const fieldName: string): string;
    function  GetHeaderFieldAttribute(const name: string; const attrName: string): string;
    function  GetHeaderFieldName(index: Integer): string;
    function  GetHeaderFieldValue(index: Integer): string;
    function  GetMime: string;
    function  GetSignatureSigningTimeStr(index: Integer): string;
    function  GetXml: string;
    function  HasSignatureSigningTime(index: Integer): Boolean;
    function  IsApplicationData: Boolean;
    function  IsAttachment: Boolean;
    function  IsAudio: Boolean;
    function  IsEncrypted: Boolean;
    function  IsHtml: Boolean;
    function  IsImage: Boolean;
    function  IsMultipart: Boolean;
    function  IsMultipartAlternative: Boolean;
    function  IsMultipartMixed: Boolean;
    function  IsMultipartRelated: Boolean;
    function  IsPlainText: Boolean;
    function  IsSigned: Boolean;
    function  IsText: Boolean;
    function  IsVideo: Boolean;
    function  IsXml: Boolean;
    function  LoadMime(const mimeMsg: string): Boolean;
    function  LoadMimeFile(const fileName: string): Boolean;
    function  LoadXml(const xml: string): Boolean;
    function  LoadXmlFile(const fileName: string): Boolean;
    function  NewMessageRfc822(mimeObject: TChilkatBase): Boolean;
    function  NewMultipartAlternative: Boolean;
    function  NewMultipartMixed: Boolean;
    function  NewMultipartRelated: Boolean;
    procedure RemoveHeaderField(const fieldName: string; bAllOccurrences: Boolean);
    function  RemovePart(index: Integer): Boolean;
    function  SaveBody(const filename: string): Boolean;
    function  SaveMime(const filename: string): Boolean;
    function  SaveXml(const filename: string): Boolean;
    procedure SetBody(const str: string);
    function  SetBodyFromEncoded(const encoding: string; const str: string): Boolean;
    function  SetBodyFromFile(const fileName: string): Boolean;
    function  SetBodyFromHtml(const str: string): Boolean;
    function  SetBodyFromPlainText(const str: string): Boolean;
    function  SetBodyFromXml(const str: string): Boolean;
    function  SetHeaderField(const name: string; const value: string): Boolean;
    function  SetVerifyCert(cert: TChilkatBase): Boolean;
    function  UnwrapSecurity: Boolean;
    procedure UrlEncodeBody(const charset: string);
    function  UseCertVault(vault: TChilkatBase): Boolean;
    function  Verify: Boolean;
    function  GetStructure(const fmt: string): string;
    function  GetMimeSb(sb: TChilkatBase): Boolean;
    function  GetMimeBd(bindat: TChilkatBase): Boolean;
    function  LoadMimeSb(sb: TChilkatBase): Boolean;
    function  LoadMimeBd(bindat: TChilkatBase): Boolean;
    function  GetBodyBd(binDat: TChilkatBase): Boolean;
    procedure GetLastJsonData(json: TChilkatBase);
    function  LastDecryptCert(index: Integer; cert: TChilkatBase): Boolean;
    function  LastSignerCert(index: Integer; cert: TChilkatBase): Boolean;
    function  PartAt(index: Integer; subPart: TChilkatBase): Boolean;
    function  PartsToFiles(const path: string; st: TChilkatBase): Boolean;
    function  AddPfxSourceBd(bd: TChilkatBase; const password: string): Boolean;
    function  SetBodyBd(bd: TChilkatBase): Boolean;
    function  GetDecryptCertInfo(certInfo: TChilkatBase): Boolean;
  end;

implementation

uses
  CkDllLoader,
  Chilkat.Utils;

{ ---- C bridge function pointer types ---- }
type
  TCkMime_Create  = function(): Pointer; cdecl;
  TCkMime_Dispose = procedure(handle: Pointer); cdecl;
  TCkMime_get_LastErrorHtml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_get_LastErrorText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_get_LastErrorXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_get_Version = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_get_DebugLogFilePath = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_DebugLogFilePath = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_VerboseLogging = function(handle: Pointer): LongBool; cdecl;
  TCkMime_put_VerboseLogging = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkMime_get_LastMethodSuccess = function(handle: Pointer): LongBool; cdecl;
  TCkMime_put_LastMethodSuccess = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkMime_get_Boundary = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Boundary = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_Charset = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Charset = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_ContentType = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_ContentType = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_CurrentDateTime = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_get_Disposition = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Disposition = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_Encoding = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Encoding = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_Filename = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Filename = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_Micalg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Micalg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_Name = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Name = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_NumHeaderFields = function(handle: Pointer): Integer; cdecl;
  TCkMime_get_NumParts = function(handle: Pointer): Integer; cdecl;
  TCkMime_get_NumSignerCerts = function(handle: Pointer): Integer; cdecl;
  TCkMime_get_Pkcs7CryptAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Pkcs7CryptAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_Pkcs7KeyLength = function(handle: Pointer): Integer; cdecl;
  TCkMime_put_Pkcs7KeyLength = procedure(handle: Pointer; value: Integer); cdecl;
  TCkMime_get_Protocol = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_Protocol = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_SigningHashAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_SigningHashAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_UnwrapExtras = function(handle: Pointer): LongBool; cdecl;
  TCkMime_put_UnwrapExtras = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkMime_get_UseMmDescription = function(handle: Pointer): LongBool; cdecl;
  TCkMime_put_UseMmDescription = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkMime_get_UseXPkcs7 = function(handle: Pointer): LongBool; cdecl;
  TCkMime_put_UseXPkcs7 = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkMime_get_SigningAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_SigningAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_OaepHash = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_OaepHash = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_OaepPadding = function(handle: Pointer): LongBool; cdecl;
  TCkMime_put_OaepPadding = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkMime_get_OaepMgfHash = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_OaepMgfHash = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_CmsOptions = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_CmsOptions = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_UncommonOptions = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_put_UncommonOptions = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkMime_get_NumDecryptCerts = function(handle: Pointer): Integer; cdecl;
  TCkMime_AddContentLength = procedure(handle: Pointer); cdecl;
  TCkMime_AddDecryptCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_AddDetachedSignature = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_AddDetachedSignature2 = function(handle: Pointer; cert: Pointer; transferHeaderFields: LongBool): LongBool; cdecl;
  TCkMime_AddDetachedSignaturePk = function(handle: Pointer; cert: Pointer; privateKey: Pointer): LongBool; cdecl;
  TCkMime_AddDetachedSignaturePk2 = function(handle: Pointer; cert: Pointer; privateKey: Pointer; transferHeaderFields: LongBool): LongBool; cdecl;
  TCkMime_AddEncryptCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_AddHeaderField = function(handle: Pointer; name: PAnsiChar; value: PAnsiChar): LongBool; cdecl;
  TCkMime_AddPfxSourceFile = function(handle: Pointer; pfxFilePath: PAnsiChar; password: PAnsiChar): LongBool; cdecl;
  TCkMime_AppendPart = function(handle: Pointer; mime: Pointer): LongBool; cdecl;
  TCkMime_AppendPartFromFile = function(handle: Pointer; filename: PAnsiChar): LongBool; cdecl;
  TCkMime_AsnBodyToXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_ClearEncryptCerts = procedure(handle: Pointer); cdecl;
  TCkMime_ContainsEncryptedParts = function(handle: Pointer): LongBool; cdecl;
  TCkMime_ContainsSignedParts = function(handle: Pointer): LongBool; cdecl;
  TCkMime_Convert8Bit = procedure(handle: Pointer); cdecl;
  TCkMime_ConvertToMultipartAlt = function(handle: Pointer): LongBool; cdecl;
  TCkMime_ConvertToMultipartMixed = function(handle: Pointer): LongBool; cdecl;
  TCkMime_ConvertToSigned = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_ConvertToSignedPk = function(handle: Pointer; cert: Pointer; privateKey: Pointer): LongBool; cdecl;
  TCkMime_Decrypt = function(handle: Pointer): LongBool; cdecl;
  TCkMime_Decrypt2 = function(handle: Pointer; cert: Pointer; privateKey: Pointer): LongBool; cdecl;
  TCkMime_DecryptUsingCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_DecryptUsingPfxFile = function(handle: Pointer; pfxFilePath: PAnsiChar; pfxPassword: PAnsiChar): LongBool; cdecl;
  TCkMime_Encrypt = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_EncryptN = function(handle: Pointer): LongBool; cdecl;
  TCkMime_GetBodyDecoded = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_GetBodyEncoded = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_GetEntireBody = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_GetEntireHead = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_GetHeaderField = function(handle: Pointer; fieldName: PAnsiChar): PAnsiChar; cdecl;
  TCkMime_GetHeaderFieldAttribute = function(handle: Pointer; name: PAnsiChar; attrName: PAnsiChar): PAnsiChar; cdecl;
  TCkMime_GetHeaderFieldName = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkMime_GetHeaderFieldValue = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkMime_GetMime = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_GetSignatureSigningTimeStr = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkMime_GetXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkMime_HasSignatureSigningTime = function(handle: Pointer; index: Integer): LongBool; cdecl;
  TCkMime_IsApplicationData = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsAttachment = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsAudio = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsEncrypted = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsHtml = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsImage = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsMultipart = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsMultipartAlternative = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsMultipartMixed = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsMultipartRelated = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsPlainText = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsSigned = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsText = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsVideo = function(handle: Pointer): LongBool; cdecl;
  TCkMime_IsXml = function(handle: Pointer): LongBool; cdecl;
  TCkMime_LoadMime = function(handle: Pointer; mimeMsg: PAnsiChar): LongBool; cdecl;
  TCkMime_LoadMimeFile = function(handle: Pointer; fileName: PAnsiChar): LongBool; cdecl;
  TCkMime_LoadXml = function(handle: Pointer; xml: PAnsiChar): LongBool; cdecl;
  TCkMime_LoadXmlFile = function(handle: Pointer; fileName: PAnsiChar): LongBool; cdecl;
  TCkMime_NewMessageRfc822 = function(handle: Pointer; mimeObject: Pointer): LongBool; cdecl;
  TCkMime_NewMultipartAlternative = function(handle: Pointer): LongBool; cdecl;
  TCkMime_NewMultipartMixed = function(handle: Pointer): LongBool; cdecl;
  TCkMime_NewMultipartRelated = function(handle: Pointer): LongBool; cdecl;
  TCkMime_RemoveHeaderField = procedure(handle: Pointer; fieldName: PAnsiChar; bAllOccurrences: LongBool); cdecl;
  TCkMime_RemovePart = function(handle: Pointer; index: Integer): LongBool; cdecl;
  TCkMime_SaveBody = function(handle: Pointer; filename: PAnsiChar): LongBool; cdecl;
  TCkMime_SaveMime = function(handle: Pointer; filename: PAnsiChar): LongBool; cdecl;
  TCkMime_SaveXml = function(handle: Pointer; filename: PAnsiChar): LongBool; cdecl;
  TCkMime_SetBody = procedure(handle: Pointer; str: PAnsiChar); cdecl;
  TCkMime_SetBodyFromEncoded = function(handle: Pointer; encoding: PAnsiChar; str: PAnsiChar): LongBool; cdecl;
  TCkMime_SetBodyFromFile = function(handle: Pointer; fileName: PAnsiChar): LongBool; cdecl;
  TCkMime_SetBodyFromHtml = function(handle: Pointer; str: PAnsiChar): LongBool; cdecl;
  TCkMime_SetBodyFromPlainText = function(handle: Pointer; str: PAnsiChar): LongBool; cdecl;
  TCkMime_SetBodyFromXml = function(handle: Pointer; str: PAnsiChar): LongBool; cdecl;
  TCkMime_SetHeaderField = function(handle: Pointer; name: PAnsiChar; value: PAnsiChar): LongBool; cdecl;
  TCkMime_SetVerifyCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkMime_UnwrapSecurity = function(handle: Pointer): LongBool; cdecl;
  TCkMime_UrlEncodeBody = procedure(handle: Pointer; charset: PAnsiChar); cdecl;
  TCkMime_UseCertVault = function(handle: Pointer; vault: Pointer): LongBool; cdecl;
  TCkMime_Verify = function(handle: Pointer): LongBool; cdecl;
  TCkMime_GetStructure = function(handle: Pointer; fmt: PAnsiChar): PAnsiChar; cdecl;
  TCkMime_GetMimeSb = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkMime_GetMimeBd = function(handle: Pointer; bindat: Pointer): LongBool; cdecl;
  TCkMime_LoadMimeSb = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkMime_LoadMimeBd = function(handle: Pointer; bindat: Pointer): LongBool; cdecl;
  TCkMime_GetBodyBd = function(handle: Pointer; binDat: Pointer): LongBool; cdecl;
  TCkMime_GetLastJsonData = procedure(handle: Pointer; json: Pointer); cdecl;
  TCkMime_LastDecryptCert = function(handle: Pointer; index: Integer; cert: Pointer): LongBool; cdecl;
  TCkMime_LastSignerCert = function(handle: Pointer; index: Integer; cert: Pointer): LongBool; cdecl;
  TCkMime_PartAt = function(handle: Pointer; index: Integer; subPart: Pointer): LongBool; cdecl;
  TCkMime_PartsToFiles = function(handle: Pointer; path: PAnsiChar; st: Pointer): LongBool; cdecl;
  TCkMime_AddPfxSourceBd = function(handle: Pointer; bd: Pointer; password: PAnsiChar): LongBool; cdecl;
  TCkMime_SetBodyBd = function(handle: Pointer; bd: Pointer): LongBool; cdecl;
  TCkMime_GetDecryptCertInfo = function(handle: Pointer; certInfo: Pointer): LongBool; cdecl;

{ ---- C bridge function pointer variables ---- }
var
  CkMime_Create:  TCkMime_Create  = nil;
  CkMime_Dispose: TCkMime_Dispose = nil;
  CkMime_get_LastErrorHtml: TCkMime_get_LastErrorHtml = nil;
  CkMime_get_LastErrorText: TCkMime_get_LastErrorText = nil;
  CkMime_get_LastErrorXml: TCkMime_get_LastErrorXml = nil;
  CkMime_get_Version: TCkMime_get_Version = nil;
  CkMime_get_DebugLogFilePath: TCkMime_get_DebugLogFilePath = nil;
  CkMime_put_DebugLogFilePath: TCkMime_put_DebugLogFilePath = nil;
  CkMime_get_VerboseLogging: TCkMime_get_VerboseLogging = nil;
  CkMime_put_VerboseLogging: TCkMime_put_VerboseLogging = nil;
  CkMime_get_LastMethodSuccess: TCkMime_get_LastMethodSuccess = nil;
  CkMime_put_LastMethodSuccess: TCkMime_put_LastMethodSuccess = nil;
  CkMime_get_Boundary: TCkMime_get_Boundary = nil;
  CkMime_put_Boundary: TCkMime_put_Boundary = nil;
  CkMime_get_Charset: TCkMime_get_Charset = nil;
  CkMime_put_Charset: TCkMime_put_Charset = nil;
  CkMime_get_ContentType: TCkMime_get_ContentType = nil;
  CkMime_put_ContentType: TCkMime_put_ContentType = nil;
  CkMime_get_CurrentDateTime: TCkMime_get_CurrentDateTime = nil;
  CkMime_get_Disposition: TCkMime_get_Disposition = nil;
  CkMime_put_Disposition: TCkMime_put_Disposition = nil;
  CkMime_get_Encoding: TCkMime_get_Encoding = nil;
  CkMime_put_Encoding: TCkMime_put_Encoding = nil;
  CkMime_get_Filename: TCkMime_get_Filename = nil;
  CkMime_put_Filename: TCkMime_put_Filename = nil;
  CkMime_get_Micalg: TCkMime_get_Micalg = nil;
  CkMime_put_Micalg: TCkMime_put_Micalg = nil;
  CkMime_get_Name: TCkMime_get_Name = nil;
  CkMime_put_Name: TCkMime_put_Name = nil;
  CkMime_get_NumHeaderFields: TCkMime_get_NumHeaderFields = nil;
  CkMime_get_NumParts: TCkMime_get_NumParts = nil;
  CkMime_get_NumSignerCerts: TCkMime_get_NumSignerCerts = nil;
  CkMime_get_Pkcs7CryptAlg: TCkMime_get_Pkcs7CryptAlg = nil;
  CkMime_put_Pkcs7CryptAlg: TCkMime_put_Pkcs7CryptAlg = nil;
  CkMime_get_Pkcs7KeyLength: TCkMime_get_Pkcs7KeyLength = nil;
  CkMime_put_Pkcs7KeyLength: TCkMime_put_Pkcs7KeyLength = nil;
  CkMime_get_Protocol: TCkMime_get_Protocol = nil;
  CkMime_put_Protocol: TCkMime_put_Protocol = nil;
  CkMime_get_SigningHashAlg: TCkMime_get_SigningHashAlg = nil;
  CkMime_put_SigningHashAlg: TCkMime_put_SigningHashAlg = nil;
  CkMime_get_UnwrapExtras: TCkMime_get_UnwrapExtras = nil;
  CkMime_put_UnwrapExtras: TCkMime_put_UnwrapExtras = nil;
  CkMime_get_UseMmDescription: TCkMime_get_UseMmDescription = nil;
  CkMime_put_UseMmDescription: TCkMime_put_UseMmDescription = nil;
  CkMime_get_UseXPkcs7: TCkMime_get_UseXPkcs7 = nil;
  CkMime_put_UseXPkcs7: TCkMime_put_UseXPkcs7 = nil;
  CkMime_get_SigningAlg: TCkMime_get_SigningAlg = nil;
  CkMime_put_SigningAlg: TCkMime_put_SigningAlg = nil;
  CkMime_get_OaepHash: TCkMime_get_OaepHash = nil;
  CkMime_put_OaepHash: TCkMime_put_OaepHash = nil;
  CkMime_get_OaepPadding: TCkMime_get_OaepPadding = nil;
  CkMime_put_OaepPadding: TCkMime_put_OaepPadding = nil;
  CkMime_get_OaepMgfHash: TCkMime_get_OaepMgfHash = nil;
  CkMime_put_OaepMgfHash: TCkMime_put_OaepMgfHash = nil;
  CkMime_get_CmsOptions: TCkMime_get_CmsOptions = nil;
  CkMime_put_CmsOptions: TCkMime_put_CmsOptions = nil;
  CkMime_get_UncommonOptions: TCkMime_get_UncommonOptions = nil;
  CkMime_put_UncommonOptions: TCkMime_put_UncommonOptions = nil;
  CkMime_get_NumDecryptCerts: TCkMime_get_NumDecryptCerts = nil;
  CkMime_AddContentLength: TCkMime_AddContentLength = nil;
  CkMime_AddDecryptCert: TCkMime_AddDecryptCert = nil;
  CkMime_AddDetachedSignature: TCkMime_AddDetachedSignature = nil;
  CkMime_AddDetachedSignature2: TCkMime_AddDetachedSignature2 = nil;
  CkMime_AddDetachedSignaturePk: TCkMime_AddDetachedSignaturePk = nil;
  CkMime_AddDetachedSignaturePk2: TCkMime_AddDetachedSignaturePk2 = nil;
  CkMime_AddEncryptCert: TCkMime_AddEncryptCert = nil;
  CkMime_AddHeaderField: TCkMime_AddHeaderField = nil;
  CkMime_AddPfxSourceFile: TCkMime_AddPfxSourceFile = nil;
  CkMime_AppendPart: TCkMime_AppendPart = nil;
  CkMime_AppendPartFromFile: TCkMime_AppendPartFromFile = nil;
  CkMime_AsnBodyToXml: TCkMime_AsnBodyToXml = nil;
  CkMime_ClearEncryptCerts: TCkMime_ClearEncryptCerts = nil;
  CkMime_ContainsEncryptedParts: TCkMime_ContainsEncryptedParts = nil;
  CkMime_ContainsSignedParts: TCkMime_ContainsSignedParts = nil;
  CkMime_Convert8Bit: TCkMime_Convert8Bit = nil;
  CkMime_ConvertToMultipartAlt: TCkMime_ConvertToMultipartAlt = nil;
  CkMime_ConvertToMultipartMixed: TCkMime_ConvertToMultipartMixed = nil;
  CkMime_ConvertToSigned: TCkMime_ConvertToSigned = nil;
  CkMime_ConvertToSignedPk: TCkMime_ConvertToSignedPk = nil;
  CkMime_Decrypt: TCkMime_Decrypt = nil;
  CkMime_Decrypt2: TCkMime_Decrypt2 = nil;
  CkMime_DecryptUsingCert: TCkMime_DecryptUsingCert = nil;
  CkMime_DecryptUsingPfxFile: TCkMime_DecryptUsingPfxFile = nil;
  CkMime_Encrypt: TCkMime_Encrypt = nil;
  CkMime_EncryptN: TCkMime_EncryptN = nil;
  CkMime_GetBodyDecoded: TCkMime_GetBodyDecoded = nil;
  CkMime_GetBodyEncoded: TCkMime_GetBodyEncoded = nil;
  CkMime_GetEntireBody: TCkMime_GetEntireBody = nil;
  CkMime_GetEntireHead: TCkMime_GetEntireHead = nil;
  CkMime_GetHeaderField: TCkMime_GetHeaderField = nil;
  CkMime_GetHeaderFieldAttribute: TCkMime_GetHeaderFieldAttribute = nil;
  CkMime_GetHeaderFieldName: TCkMime_GetHeaderFieldName = nil;
  CkMime_GetHeaderFieldValue: TCkMime_GetHeaderFieldValue = nil;
  CkMime_GetMime: TCkMime_GetMime = nil;
  CkMime_GetSignatureSigningTimeStr: TCkMime_GetSignatureSigningTimeStr = nil;
  CkMime_GetXml: TCkMime_GetXml = nil;
  CkMime_HasSignatureSigningTime: TCkMime_HasSignatureSigningTime = nil;
  CkMime_IsApplicationData: TCkMime_IsApplicationData = nil;
  CkMime_IsAttachment: TCkMime_IsAttachment = nil;
  CkMime_IsAudio: TCkMime_IsAudio = nil;
  CkMime_IsEncrypted: TCkMime_IsEncrypted = nil;
  CkMime_IsHtml: TCkMime_IsHtml = nil;
  CkMime_IsImage: TCkMime_IsImage = nil;
  CkMime_IsMultipart: TCkMime_IsMultipart = nil;
  CkMime_IsMultipartAlternative: TCkMime_IsMultipartAlternative = nil;
  CkMime_IsMultipartMixed: TCkMime_IsMultipartMixed = nil;
  CkMime_IsMultipartRelated: TCkMime_IsMultipartRelated = nil;
  CkMime_IsPlainText: TCkMime_IsPlainText = nil;
  CkMime_IsSigned: TCkMime_IsSigned = nil;
  CkMime_IsText: TCkMime_IsText = nil;
  CkMime_IsVideo: TCkMime_IsVideo = nil;
  CkMime_IsXml: TCkMime_IsXml = nil;
  CkMime_LoadMime: TCkMime_LoadMime = nil;
  CkMime_LoadMimeFile: TCkMime_LoadMimeFile = nil;
  CkMime_LoadXml: TCkMime_LoadXml = nil;
  CkMime_LoadXmlFile: TCkMime_LoadXmlFile = nil;
  CkMime_NewMessageRfc822: TCkMime_NewMessageRfc822 = nil;
  CkMime_NewMultipartAlternative: TCkMime_NewMultipartAlternative = nil;
  CkMime_NewMultipartMixed: TCkMime_NewMultipartMixed = nil;
  CkMime_NewMultipartRelated: TCkMime_NewMultipartRelated = nil;
  CkMime_RemoveHeaderField: TCkMime_RemoveHeaderField = nil;
  CkMime_RemovePart: TCkMime_RemovePart = nil;
  CkMime_SaveBody: TCkMime_SaveBody = nil;
  CkMime_SaveMime: TCkMime_SaveMime = nil;
  CkMime_SaveXml: TCkMime_SaveXml = nil;
  CkMime_SetBody: TCkMime_SetBody = nil;
  CkMime_SetBodyFromEncoded: TCkMime_SetBodyFromEncoded = nil;
  CkMime_SetBodyFromFile: TCkMime_SetBodyFromFile = nil;
  CkMime_SetBodyFromHtml: TCkMime_SetBodyFromHtml = nil;
  CkMime_SetBodyFromPlainText: TCkMime_SetBodyFromPlainText = nil;
  CkMime_SetBodyFromXml: TCkMime_SetBodyFromXml = nil;
  CkMime_SetHeaderField: TCkMime_SetHeaderField = nil;
  CkMime_SetVerifyCert: TCkMime_SetVerifyCert = nil;
  CkMime_UnwrapSecurity: TCkMime_UnwrapSecurity = nil;
  CkMime_UrlEncodeBody: TCkMime_UrlEncodeBody = nil;
  CkMime_UseCertVault: TCkMime_UseCertVault = nil;
  CkMime_Verify: TCkMime_Verify = nil;
  CkMime_GetStructure: TCkMime_GetStructure = nil;
  CkMime_GetMimeSb: TCkMime_GetMimeSb = nil;
  CkMime_GetMimeBd: TCkMime_GetMimeBd = nil;
  CkMime_LoadMimeSb: TCkMime_LoadMimeSb = nil;
  CkMime_LoadMimeBd: TCkMime_LoadMimeBd = nil;
  CkMime_GetBodyBd: TCkMime_GetBodyBd = nil;
  CkMime_GetLastJsonData: TCkMime_GetLastJsonData = nil;
  CkMime_LastDecryptCert: TCkMime_LastDecryptCert = nil;
  CkMime_LastSignerCert: TCkMime_LastSignerCert = nil;
  CkMime_PartAt: TCkMime_PartAt = nil;
  CkMime_PartsToFiles: TCkMime_PartsToFiles = nil;
  CkMime_AddPfxSourceBd: TCkMime_AddPfxSourceBd = nil;
  CkMime_SetBodyBd: TCkMime_SetBodyBd = nil;
  CkMime_GetDecryptCertInfo: TCkMime_GetDecryptCertInfo = nil;

constructor TMime.Create;
begin
  inherited Create;
  FHandle := CkMime_Create();
end;

destructor TMime.Destroy;
begin
  if FHandle <> nil then
    CkMime_Dispose(FHandle);
  FHandle := nil;
  inherited;
end;

function TMime.GetLastErrorHtml: string;
begin
  Result := CkToStr(CkMime_get_LastErrorHtml(FHandle));
end;

function TMime.GetLastErrorText: string;
begin
  Result := CkToStr(CkMime_get_LastErrorText(FHandle));
end;

function TMime.GetLastErrorXml: string;
begin
  Result := CkToStr(CkMime_get_LastErrorXml(FHandle));
end;

function TMime.GetVersion: string;
begin
  Result := CkToStr(CkMime_get_Version(FHandle));
end;

function TMime.GetDebugLogFilePath: string;
begin
  Result := CkToStr(CkMime_get_DebugLogFilePath(FHandle));
end;

procedure TMime.SetDebugLogFilePath(AValue: string);
begin
  CkMime_put_DebugLogFilePath(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetVerboseLogging: Boolean;
begin
  Result := Boolean(CkMime_get_VerboseLogging(FHandle));
end;

procedure TMime.SetVerboseLogging(AValue: Boolean);
begin
  CkMime_put_VerboseLogging(FHandle, LongBool(AValue));
end;

function TMime.GetLastMethodSuccess: Boolean;
begin
  Result := Boolean(CkMime_get_LastMethodSuccess(FHandle));
end;

procedure TMime.SetLastMethodSuccess(AValue: Boolean);
begin
  CkMime_put_LastMethodSuccess(FHandle, LongBool(AValue));
end;

function TMime.GetBoundary: string;
begin
  Result := CkToStr(CkMime_get_Boundary(FHandle));
end;

procedure TMime.SetBoundary(AValue: string);
begin
  CkMime_put_Boundary(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetCharset: string;
begin
  Result := CkToStr(CkMime_get_Charset(FHandle));
end;

procedure TMime.SetCharset(AValue: string);
begin
  CkMime_put_Charset(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetContentType: string;
begin
  Result := CkToStr(CkMime_get_ContentType(FHandle));
end;

procedure TMime.SetContentType(AValue: string);
begin
  CkMime_put_ContentType(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetCurrentDateTime: string;
begin
  Result := CkToStr(CkMime_get_CurrentDateTime(FHandle));
end;

function TMime.GetDisposition: string;
begin
  Result := CkToStr(CkMime_get_Disposition(FHandle));
end;

procedure TMime.SetDisposition(AValue: string);
begin
  CkMime_put_Disposition(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetEncoding: string;
begin
  Result := CkToStr(CkMime_get_Encoding(FHandle));
end;

procedure TMime.SetEncoding(AValue: string);
begin
  CkMime_put_Encoding(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetFilename: string;
begin
  Result := CkToStr(CkMime_get_Filename(FHandle));
end;

procedure TMime.SetFilename(AValue: string);
begin
  CkMime_put_Filename(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetMicalg: string;
begin
  Result := CkToStr(CkMime_get_Micalg(FHandle));
end;

procedure TMime.SetMicalg(AValue: string);
begin
  CkMime_put_Micalg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetName: string;
begin
  Result := CkToStr(CkMime_get_Name(FHandle));
end;

procedure TMime.SetName(AValue: string);
begin
  CkMime_put_Name(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetNumHeaderFields: Integer;
begin
  Result := CkMime_get_NumHeaderFields(FHandle);
end;

function TMime.GetNumParts: Integer;
begin
  Result := CkMime_get_NumParts(FHandle);
end;

function TMime.GetNumSignerCerts: Integer;
begin
  Result := CkMime_get_NumSignerCerts(FHandle);
end;

function TMime.GetPkcs7CryptAlg: string;
begin
  Result := CkToStr(CkMime_get_Pkcs7CryptAlg(FHandle));
end;

procedure TMime.SetPkcs7CryptAlg(AValue: string);
begin
  CkMime_put_Pkcs7CryptAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetPkcs7KeyLength: Integer;
begin
  Result := CkMime_get_Pkcs7KeyLength(FHandle);
end;

procedure TMime.SetPkcs7KeyLength(AValue: Integer);
begin
  CkMime_put_Pkcs7KeyLength(FHandle, AValue);
end;

function TMime.GetProtocol: string;
begin
  Result := CkToStr(CkMime_get_Protocol(FHandle));
end;

procedure TMime.SetProtocol(AValue: string);
begin
  CkMime_put_Protocol(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetSigningHashAlg: string;
begin
  Result := CkToStr(CkMime_get_SigningHashAlg(FHandle));
end;

procedure TMime.SetSigningHashAlg(AValue: string);
begin
  CkMime_put_SigningHashAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetUnwrapExtras: Boolean;
begin
  Result := Boolean(CkMime_get_UnwrapExtras(FHandle));
end;

procedure TMime.SetUnwrapExtras(AValue: Boolean);
begin
  CkMime_put_UnwrapExtras(FHandle, LongBool(AValue));
end;

function TMime.GetUseMmDescription: Boolean;
begin
  Result := Boolean(CkMime_get_UseMmDescription(FHandle));
end;

procedure TMime.SetUseMmDescription(AValue: Boolean);
begin
  CkMime_put_UseMmDescription(FHandle, LongBool(AValue));
end;

function TMime.GetUseXPkcs7: Boolean;
begin
  Result := Boolean(CkMime_get_UseXPkcs7(FHandle));
end;

procedure TMime.SetUseXPkcs7(AValue: Boolean);
begin
  CkMime_put_UseXPkcs7(FHandle, LongBool(AValue));
end;

function TMime.GetSigningAlg: string;
begin
  Result := CkToStr(CkMime_get_SigningAlg(FHandle));
end;

procedure TMime.SetSigningAlg(AValue: string);
begin
  CkMime_put_SigningAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetOaepHash: string;
begin
  Result := CkToStr(CkMime_get_OaepHash(FHandle));
end;

procedure TMime.SetOaepHash(AValue: string);
begin
  CkMime_put_OaepHash(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetOaepPadding: Boolean;
begin
  Result := Boolean(CkMime_get_OaepPadding(FHandle));
end;

procedure TMime.SetOaepPadding(AValue: Boolean);
begin
  CkMime_put_OaepPadding(FHandle, LongBool(AValue));
end;

function TMime.GetOaepMgfHash: string;
begin
  Result := CkToStr(CkMime_get_OaepMgfHash(FHandle));
end;

procedure TMime.SetOaepMgfHash(AValue: string);
begin
  CkMime_put_OaepMgfHash(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetCmsOptions: string;
begin
  Result := CkToStr(CkMime_get_CmsOptions(FHandle));
end;

procedure TMime.SetCmsOptions(AValue: string);
begin
  CkMime_put_CmsOptions(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetUncommonOptions: string;
begin
  Result := CkToStr(CkMime_get_UncommonOptions(FHandle));
end;

procedure TMime.SetUncommonOptions(AValue: string);
begin
  CkMime_put_UncommonOptions(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TMime.GetNumDecryptCerts: Integer;
begin
  Result := CkMime_get_NumDecryptCerts(FHandle);
end;

procedure TMime.AddContentLength;
begin
  CkMime_AddContentLength(FHandle);
end;

function TMime.AddDecryptCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_AddDecryptCert(FHandle, cert.Handle));
end;

function TMime.AddDetachedSignature(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_AddDetachedSignature(FHandle, cert.Handle));
end;

function TMime.AddDetachedSignature2(cert: TChilkatBase; transferHeaderFields: Boolean): Boolean;
begin
  Result := Boolean(CkMime_AddDetachedSignature2(FHandle, cert.Handle, LongBool(transferHeaderFields)));
end;

function TMime.AddDetachedSignaturePk(cert: TChilkatBase; privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_AddDetachedSignaturePk(FHandle, cert.Handle, privateKey.Handle));
end;

function TMime.AddDetachedSignaturePk2(cert: TChilkatBase; privateKey: TChilkatBase; transferHeaderFields: Boolean): Boolean;
begin
  Result := Boolean(CkMime_AddDetachedSignaturePk2(FHandle, cert.Handle, privateKey.Handle, LongBool(transferHeaderFields)));
end;

function TMime.AddEncryptCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_AddEncryptCert(FHandle, cert.Handle));
end;

function TMime.AddHeaderField(const name: string; const value: string): Boolean;
begin
  Result := Boolean(CkMime_AddHeaderField(FHandle, PAnsiChar(StrToCk(name)), PAnsiChar(StrToCk(value))));
end;

function TMime.AddPfxSourceFile(const pfxFilePath: string; const password: string): Boolean;
begin
  Result := Boolean(CkMime_AddPfxSourceFile(FHandle, PAnsiChar(StrToCk(pfxFilePath)), PAnsiChar(StrToCk(password))));
end;

function TMime.AppendPart(mime: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_AppendPart(FHandle, mime.Handle));
end;

function TMime.AppendPartFromFile(const filename: string): Boolean;
begin
  Result := Boolean(CkMime_AppendPartFromFile(FHandle, PAnsiChar(StrToCk(filename))));
end;

function TMime.AsnBodyToXml: string;
begin
  Result := CkToStr(CkMime_AsnBodyToXml(FHandle));
end;

procedure TMime.ClearEncryptCerts;
begin
  CkMime_ClearEncryptCerts(FHandle);
end;

function TMime.ContainsEncryptedParts: Boolean;
begin
  Result := Boolean(CkMime_ContainsEncryptedParts(FHandle));
end;

function TMime.ContainsSignedParts: Boolean;
begin
  Result := Boolean(CkMime_ContainsSignedParts(FHandle));
end;

procedure TMime.Convert8Bit;
begin
  CkMime_Convert8Bit(FHandle);
end;

function TMime.ConvertToMultipartAlt: Boolean;
begin
  Result := Boolean(CkMime_ConvertToMultipartAlt(FHandle));
end;

function TMime.ConvertToMultipartMixed: Boolean;
begin
  Result := Boolean(CkMime_ConvertToMultipartMixed(FHandle));
end;

function TMime.ConvertToSigned(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_ConvertToSigned(FHandle, cert.Handle));
end;

function TMime.ConvertToSignedPk(cert: TChilkatBase; privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_ConvertToSignedPk(FHandle, cert.Handle, privateKey.Handle));
end;

function TMime.Decrypt: Boolean;
begin
  Result := Boolean(CkMime_Decrypt(FHandle));
end;

function TMime.Decrypt2(cert: TChilkatBase; privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_Decrypt2(FHandle, cert.Handle, privateKey.Handle));
end;

function TMime.DecryptUsingCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_DecryptUsingCert(FHandle, cert.Handle));
end;

function TMime.DecryptUsingPfxFile(const pfxFilePath: string; const pfxPassword: string): Boolean;
begin
  Result := Boolean(CkMime_DecryptUsingPfxFile(FHandle, PAnsiChar(StrToCk(pfxFilePath)), PAnsiChar(StrToCk(pfxPassword))));
end;

function TMime.Encrypt(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_Encrypt(FHandle, cert.Handle));
end;

function TMime.EncryptN: Boolean;
begin
  Result := Boolean(CkMime_EncryptN(FHandle));
end;

function TMime.GetBodyDecoded: string;
begin
  Result := CkToStr(CkMime_GetBodyDecoded(FHandle));
end;

function TMime.GetBodyEncoded: string;
begin
  Result := CkToStr(CkMime_GetBodyEncoded(FHandle));
end;

function TMime.GetEntireBody: string;
begin
  Result := CkToStr(CkMime_GetEntireBody(FHandle));
end;

function TMime.GetEntireHead: string;
begin
  Result := CkToStr(CkMime_GetEntireHead(FHandle));
end;

function TMime.GetHeaderField(const fieldName: string): string;
begin
  Result := CkToStr(CkMime_GetHeaderField(FHandle, PAnsiChar(StrToCk(fieldName))));
end;

function TMime.GetHeaderFieldAttribute(const name: string; const attrName: string): string;
begin
  Result := CkToStr(CkMime_GetHeaderFieldAttribute(FHandle, PAnsiChar(StrToCk(name)), PAnsiChar(StrToCk(attrName))));
end;

function TMime.GetHeaderFieldName(index: Integer): string;
begin
  Result := CkToStr(CkMime_GetHeaderFieldName(FHandle, index));
end;

function TMime.GetHeaderFieldValue(index: Integer): string;
begin
  Result := CkToStr(CkMime_GetHeaderFieldValue(FHandle, index));
end;

function TMime.GetMime: string;
begin
  Result := CkToStr(CkMime_GetMime(FHandle));
end;

function TMime.GetSignatureSigningTimeStr(index: Integer): string;
begin
  Result := CkToStr(CkMime_GetSignatureSigningTimeStr(FHandle, index));
end;

function TMime.GetXml: string;
begin
  Result := CkToStr(CkMime_GetXml(FHandle));
end;

function TMime.HasSignatureSigningTime(index: Integer): Boolean;
begin
  Result := Boolean(CkMime_HasSignatureSigningTime(FHandle, index));
end;

function TMime.IsApplicationData: Boolean;
begin
  Result := Boolean(CkMime_IsApplicationData(FHandle));
end;

function TMime.IsAttachment: Boolean;
begin
  Result := Boolean(CkMime_IsAttachment(FHandle));
end;

function TMime.IsAudio: Boolean;
begin
  Result := Boolean(CkMime_IsAudio(FHandle));
end;

function TMime.IsEncrypted: Boolean;
begin
  Result := Boolean(CkMime_IsEncrypted(FHandle));
end;

function TMime.IsHtml: Boolean;
begin
  Result := Boolean(CkMime_IsHtml(FHandle));
end;

function TMime.IsImage: Boolean;
begin
  Result := Boolean(CkMime_IsImage(FHandle));
end;

function TMime.IsMultipart: Boolean;
begin
  Result := Boolean(CkMime_IsMultipart(FHandle));
end;

function TMime.IsMultipartAlternative: Boolean;
begin
  Result := Boolean(CkMime_IsMultipartAlternative(FHandle));
end;

function TMime.IsMultipartMixed: Boolean;
begin
  Result := Boolean(CkMime_IsMultipartMixed(FHandle));
end;

function TMime.IsMultipartRelated: Boolean;
begin
  Result := Boolean(CkMime_IsMultipartRelated(FHandle));
end;

function TMime.IsPlainText: Boolean;
begin
  Result := Boolean(CkMime_IsPlainText(FHandle));
end;

function TMime.IsSigned: Boolean;
begin
  Result := Boolean(CkMime_IsSigned(FHandle));
end;

function TMime.IsText: Boolean;
begin
  Result := Boolean(CkMime_IsText(FHandle));
end;

function TMime.IsVideo: Boolean;
begin
  Result := Boolean(CkMime_IsVideo(FHandle));
end;

function TMime.IsXml: Boolean;
begin
  Result := Boolean(CkMime_IsXml(FHandle));
end;

function TMime.LoadMime(const mimeMsg: string): Boolean;
begin
  Result := Boolean(CkMime_LoadMime(FHandle, PAnsiChar(StrToCk(mimeMsg))));
end;

function TMime.LoadMimeFile(const fileName: string): Boolean;
begin
  Result := Boolean(CkMime_LoadMimeFile(FHandle, PAnsiChar(StrToCk(fileName))));
end;

function TMime.LoadXml(const xml: string): Boolean;
begin
  Result := Boolean(CkMime_LoadXml(FHandle, PAnsiChar(StrToCk(xml))));
end;

function TMime.LoadXmlFile(const fileName: string): Boolean;
begin
  Result := Boolean(CkMime_LoadXmlFile(FHandle, PAnsiChar(StrToCk(fileName))));
end;

function TMime.NewMessageRfc822(mimeObject: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_NewMessageRfc822(FHandle, mimeObject.Handle));
end;

function TMime.NewMultipartAlternative: Boolean;
begin
  Result := Boolean(CkMime_NewMultipartAlternative(FHandle));
end;

function TMime.NewMultipartMixed: Boolean;
begin
  Result := Boolean(CkMime_NewMultipartMixed(FHandle));
end;

function TMime.NewMultipartRelated: Boolean;
begin
  Result := Boolean(CkMime_NewMultipartRelated(FHandle));
end;

procedure TMime.RemoveHeaderField(const fieldName: string; bAllOccurrences: Boolean);
begin
  CkMime_RemoveHeaderField(FHandle, PAnsiChar(StrToCk(fieldName)), LongBool(bAllOccurrences));
end;

function TMime.RemovePart(index: Integer): Boolean;
begin
  Result := Boolean(CkMime_RemovePart(FHandle, index));
end;

function TMime.SaveBody(const filename: string): Boolean;
begin
  Result := Boolean(CkMime_SaveBody(FHandle, PAnsiChar(StrToCk(filename))));
end;

function TMime.SaveMime(const filename: string): Boolean;
begin
  Result := Boolean(CkMime_SaveMime(FHandle, PAnsiChar(StrToCk(filename))));
end;

function TMime.SaveXml(const filename: string): Boolean;
begin
  Result := Boolean(CkMime_SaveXml(FHandle, PAnsiChar(StrToCk(filename))));
end;

procedure TMime.SetBody(const str: string);
begin
  CkMime_SetBody(FHandle, PAnsiChar(StrToCk(str)));
end;

function TMime.SetBodyFromEncoded(const encoding: string; const str: string): Boolean;
begin
  Result := Boolean(CkMime_SetBodyFromEncoded(FHandle, PAnsiChar(StrToCk(encoding)), PAnsiChar(StrToCk(str))));
end;

function TMime.SetBodyFromFile(const fileName: string): Boolean;
begin
  Result := Boolean(CkMime_SetBodyFromFile(FHandle, PAnsiChar(StrToCk(fileName))));
end;

function TMime.SetBodyFromHtml(const str: string): Boolean;
begin
  Result := Boolean(CkMime_SetBodyFromHtml(FHandle, PAnsiChar(StrToCk(str))));
end;

function TMime.SetBodyFromPlainText(const str: string): Boolean;
begin
  Result := Boolean(CkMime_SetBodyFromPlainText(FHandle, PAnsiChar(StrToCk(str))));
end;

function TMime.SetBodyFromXml(const str: string): Boolean;
begin
  Result := Boolean(CkMime_SetBodyFromXml(FHandle, PAnsiChar(StrToCk(str))));
end;

function TMime.SetHeaderField(const name: string; const value: string): Boolean;
begin
  Result := Boolean(CkMime_SetHeaderField(FHandle, PAnsiChar(StrToCk(name)), PAnsiChar(StrToCk(value))));
end;

function TMime.SetVerifyCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_SetVerifyCert(FHandle, cert.Handle));
end;

function TMime.UnwrapSecurity: Boolean;
begin
  Result := Boolean(CkMime_UnwrapSecurity(FHandle));
end;

procedure TMime.UrlEncodeBody(const charset: string);
begin
  CkMime_UrlEncodeBody(FHandle, PAnsiChar(StrToCk(charset)));
end;

function TMime.UseCertVault(vault: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_UseCertVault(FHandle, vault.Handle));
end;

function TMime.Verify: Boolean;
begin
  Result := Boolean(CkMime_Verify(FHandle));
end;

function TMime.GetStructure(const fmt: string): string;
begin
  Result := CkToStr(CkMime_GetStructure(FHandle, PAnsiChar(StrToCk(fmt))));
end;

function TMime.GetMimeSb(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_GetMimeSb(FHandle, sb.Handle));
end;

function TMime.GetMimeBd(bindat: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_GetMimeBd(FHandle, bindat.Handle));
end;

function TMime.LoadMimeSb(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_LoadMimeSb(FHandle, sb.Handle));
end;

function TMime.LoadMimeBd(bindat: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_LoadMimeBd(FHandle, bindat.Handle));
end;

function TMime.GetBodyBd(binDat: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_GetBodyBd(FHandle, binDat.Handle));
end;

procedure TMime.GetLastJsonData(json: TChilkatBase);
begin
  CkMime_GetLastJsonData(FHandle, json.Handle);
end;

function TMime.LastDecryptCert(index: Integer; cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_LastDecryptCert(FHandle, index, cert.Handle));
end;

function TMime.LastSignerCert(index: Integer; cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_LastSignerCert(FHandle, index, cert.Handle));
end;

function TMime.PartAt(index: Integer; subPart: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_PartAt(FHandle, index, subPart.Handle));
end;

function TMime.PartsToFiles(const path: string; st: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_PartsToFiles(FHandle, PAnsiChar(StrToCk(path)), st.Handle));
end;

function TMime.AddPfxSourceBd(bd: TChilkatBase; const password: string): Boolean;
begin
  Result := Boolean(CkMime_AddPfxSourceBd(FHandle, bd.Handle, PAnsiChar(StrToCk(password))));
end;

function TMime.SetBodyBd(bd: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_SetBodyBd(FHandle, bd.Handle));
end;

function TMime.GetDecryptCertInfo(certInfo: TChilkatBase): Boolean;
begin
  Result := Boolean(CkMime_GetDecryptCertInfo(FHandle, certInfo.Handle));
end;

initialization
  Chilkat_GetProcedureAddress(CkMime_Create,  'CkMime_Create');
  Chilkat_GetProcedureAddress(CkMime_Dispose, 'CkMime_Dispose');
  Chilkat_GetProcedureAddress(CkMime_get_LastErrorHtml, 'CkMime_get_LastErrorHtml');
  Chilkat_GetProcedureAddress(CkMime_get_LastErrorText, 'CkMime_get_LastErrorText');
  Chilkat_GetProcedureAddress(CkMime_get_LastErrorXml, 'CkMime_get_LastErrorXml');
  Chilkat_GetProcedureAddress(CkMime_get_Version, 'CkMime_get_Version');
  Chilkat_GetProcedureAddress(CkMime_get_DebugLogFilePath, 'CkMime_get_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkMime_put_DebugLogFilePath, 'CkMime_put_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkMime_get_VerboseLogging, 'CkMime_get_VerboseLogging');
  Chilkat_GetProcedureAddress(CkMime_put_VerboseLogging, 'CkMime_put_VerboseLogging');
  Chilkat_GetProcedureAddress(CkMime_get_LastMethodSuccess, 'CkMime_get_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkMime_put_LastMethodSuccess, 'CkMime_put_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkMime_get_Boundary, 'CkMime_get_Boundary');
  Chilkat_GetProcedureAddress(CkMime_put_Boundary, 'CkMime_put_Boundary');
  Chilkat_GetProcedureAddress(CkMime_get_Charset, 'CkMime_get_Charset');
  Chilkat_GetProcedureAddress(CkMime_put_Charset, 'CkMime_put_Charset');
  Chilkat_GetProcedureAddress(CkMime_get_ContentType, 'CkMime_get_ContentType');
  Chilkat_GetProcedureAddress(CkMime_put_ContentType, 'CkMime_put_ContentType');
  Chilkat_GetProcedureAddress(CkMime_get_CurrentDateTime, 'CkMime_get_CurrentDateTime');
  Chilkat_GetProcedureAddress(CkMime_get_Disposition, 'CkMime_get_Disposition');
  Chilkat_GetProcedureAddress(CkMime_put_Disposition, 'CkMime_put_Disposition');
  Chilkat_GetProcedureAddress(CkMime_get_Encoding, 'CkMime_get_Encoding');
  Chilkat_GetProcedureAddress(CkMime_put_Encoding, 'CkMime_put_Encoding');
  Chilkat_GetProcedureAddress(CkMime_get_Filename, 'CkMime_get_Filename');
  Chilkat_GetProcedureAddress(CkMime_put_Filename, 'CkMime_put_Filename');
  Chilkat_GetProcedureAddress(CkMime_get_Micalg, 'CkMime_get_Micalg');
  Chilkat_GetProcedureAddress(CkMime_put_Micalg, 'CkMime_put_Micalg');
  Chilkat_GetProcedureAddress(CkMime_get_Name, 'CkMime_get_Name');
  Chilkat_GetProcedureAddress(CkMime_put_Name, 'CkMime_put_Name');
  Chilkat_GetProcedureAddress(CkMime_get_NumHeaderFields, 'CkMime_get_NumHeaderFields');
  Chilkat_GetProcedureAddress(CkMime_get_NumParts, 'CkMime_get_NumParts');
  Chilkat_GetProcedureAddress(CkMime_get_NumSignerCerts, 'CkMime_get_NumSignerCerts');
  Chilkat_GetProcedureAddress(CkMime_get_Pkcs7CryptAlg, 'CkMime_get_Pkcs7CryptAlg');
  Chilkat_GetProcedureAddress(CkMime_put_Pkcs7CryptAlg, 'CkMime_put_Pkcs7CryptAlg');
  Chilkat_GetProcedureAddress(CkMime_get_Pkcs7KeyLength, 'CkMime_get_Pkcs7KeyLength');
  Chilkat_GetProcedureAddress(CkMime_put_Pkcs7KeyLength, 'CkMime_put_Pkcs7KeyLength');
  Chilkat_GetProcedureAddress(CkMime_get_Protocol, 'CkMime_get_Protocol');
  Chilkat_GetProcedureAddress(CkMime_put_Protocol, 'CkMime_put_Protocol');
  Chilkat_GetProcedureAddress(CkMime_get_SigningHashAlg, 'CkMime_get_SigningHashAlg');
  Chilkat_GetProcedureAddress(CkMime_put_SigningHashAlg, 'CkMime_put_SigningHashAlg');
  Chilkat_GetProcedureAddress(CkMime_get_UnwrapExtras, 'CkMime_get_UnwrapExtras');
  Chilkat_GetProcedureAddress(CkMime_put_UnwrapExtras, 'CkMime_put_UnwrapExtras');
  Chilkat_GetProcedureAddress(CkMime_get_UseMmDescription, 'CkMime_get_UseMmDescription');
  Chilkat_GetProcedureAddress(CkMime_put_UseMmDescription, 'CkMime_put_UseMmDescription');
  Chilkat_GetProcedureAddress(CkMime_get_UseXPkcs7, 'CkMime_get_UseXPkcs7');
  Chilkat_GetProcedureAddress(CkMime_put_UseXPkcs7, 'CkMime_put_UseXPkcs7');
  Chilkat_GetProcedureAddress(CkMime_get_SigningAlg, 'CkMime_get_SigningAlg');
  Chilkat_GetProcedureAddress(CkMime_put_SigningAlg, 'CkMime_put_SigningAlg');
  Chilkat_GetProcedureAddress(CkMime_get_OaepHash, 'CkMime_get_OaepHash');
  Chilkat_GetProcedureAddress(CkMime_put_OaepHash, 'CkMime_put_OaepHash');
  Chilkat_GetProcedureAddress(CkMime_get_OaepPadding, 'CkMime_get_OaepPadding');
  Chilkat_GetProcedureAddress(CkMime_put_OaepPadding, 'CkMime_put_OaepPadding');
  Chilkat_GetProcedureAddress(CkMime_get_OaepMgfHash, 'CkMime_get_OaepMgfHash');
  Chilkat_GetProcedureAddress(CkMime_put_OaepMgfHash, 'CkMime_put_OaepMgfHash');
  Chilkat_GetProcedureAddress(CkMime_get_CmsOptions, 'CkMime_get_CmsOptions');
  Chilkat_GetProcedureAddress(CkMime_put_CmsOptions, 'CkMime_put_CmsOptions');
  Chilkat_GetProcedureAddress(CkMime_get_UncommonOptions, 'CkMime_get_UncommonOptions');
  Chilkat_GetProcedureAddress(CkMime_put_UncommonOptions, 'CkMime_put_UncommonOptions');
  Chilkat_GetProcedureAddress(CkMime_get_NumDecryptCerts, 'CkMime_get_NumDecryptCerts');
  Chilkat_GetProcedureAddress(CkMime_AddContentLength, 'CkMime_AddContentLength');
  Chilkat_GetProcedureAddress(CkMime_AddDecryptCert, 'CkMime_AddDecryptCert');
  Chilkat_GetProcedureAddress(CkMime_AddDetachedSignature, 'CkMime_AddDetachedSignature');
  Chilkat_GetProcedureAddress(CkMime_AddDetachedSignature2, 'CkMime_AddDetachedSignature2');
  Chilkat_GetProcedureAddress(CkMime_AddDetachedSignaturePk, 'CkMime_AddDetachedSignaturePk');
  Chilkat_GetProcedureAddress(CkMime_AddDetachedSignaturePk2, 'CkMime_AddDetachedSignaturePk2');
  Chilkat_GetProcedureAddress(CkMime_AddEncryptCert, 'CkMime_AddEncryptCert');
  Chilkat_GetProcedureAddress(CkMime_AddHeaderField, 'CkMime_AddHeaderField');
  Chilkat_GetProcedureAddress(CkMime_AddPfxSourceFile, 'CkMime_AddPfxSourceFile');
  Chilkat_GetProcedureAddress(CkMime_AppendPart, 'CkMime_AppendPart');
  Chilkat_GetProcedureAddress(CkMime_AppendPartFromFile, 'CkMime_AppendPartFromFile');
  Chilkat_GetProcedureAddress(CkMime_AsnBodyToXml, 'CkMime_AsnBodyToXml');
  Chilkat_GetProcedureAddress(CkMime_ClearEncryptCerts, 'CkMime_ClearEncryptCerts');
  Chilkat_GetProcedureAddress(CkMime_ContainsEncryptedParts, 'CkMime_ContainsEncryptedParts');
  Chilkat_GetProcedureAddress(CkMime_ContainsSignedParts, 'CkMime_ContainsSignedParts');
  Chilkat_GetProcedureAddress(CkMime_Convert8Bit, 'CkMime_Convert8Bit');
  Chilkat_GetProcedureAddress(CkMime_ConvertToMultipartAlt, 'CkMime_ConvertToMultipartAlt');
  Chilkat_GetProcedureAddress(CkMime_ConvertToMultipartMixed, 'CkMime_ConvertToMultipartMixed');
  Chilkat_GetProcedureAddress(CkMime_ConvertToSigned, 'CkMime_ConvertToSigned');
  Chilkat_GetProcedureAddress(CkMime_ConvertToSignedPk, 'CkMime_ConvertToSignedPk');
  Chilkat_GetProcedureAddress(CkMime_Decrypt, 'CkMime_Decrypt');
  Chilkat_GetProcedureAddress(CkMime_Decrypt2, 'CkMime_Decrypt2');
  Chilkat_GetProcedureAddress(CkMime_DecryptUsingCert, 'CkMime_DecryptUsingCert');
  Chilkat_GetProcedureAddress(CkMime_DecryptUsingPfxFile, 'CkMime_DecryptUsingPfxFile');
  Chilkat_GetProcedureAddress(CkMime_Encrypt, 'CkMime_Encrypt');
  Chilkat_GetProcedureAddress(CkMime_EncryptN, 'CkMime_EncryptN');
  Chilkat_GetProcedureAddress(CkMime_GetBodyDecoded, 'CkMime_GetBodyDecoded');
  Chilkat_GetProcedureAddress(CkMime_GetBodyEncoded, 'CkMime_GetBodyEncoded');
  Chilkat_GetProcedureAddress(CkMime_GetEntireBody, 'CkMime_GetEntireBody');
  Chilkat_GetProcedureAddress(CkMime_GetEntireHead, 'CkMime_GetEntireHead');
  Chilkat_GetProcedureAddress(CkMime_GetHeaderField, 'CkMime_GetHeaderField');
  Chilkat_GetProcedureAddress(CkMime_GetHeaderFieldAttribute, 'CkMime_GetHeaderFieldAttribute');
  Chilkat_GetProcedureAddress(CkMime_GetHeaderFieldName, 'CkMime_GetHeaderFieldName');
  Chilkat_GetProcedureAddress(CkMime_GetHeaderFieldValue, 'CkMime_GetHeaderFieldValue');
  Chilkat_GetProcedureAddress(CkMime_GetMime, 'CkMime_GetMime');
  Chilkat_GetProcedureAddress(CkMime_GetSignatureSigningTimeStr, 'CkMime_GetSignatureSigningTimeStr');
  Chilkat_GetProcedureAddress(CkMime_GetXml, 'CkMime_GetXml');
  Chilkat_GetProcedureAddress(CkMime_HasSignatureSigningTime, 'CkMime_HasSignatureSigningTime');
  Chilkat_GetProcedureAddress(CkMime_IsApplicationData, 'CkMime_IsApplicationData');
  Chilkat_GetProcedureAddress(CkMime_IsAttachment, 'CkMime_IsAttachment');
  Chilkat_GetProcedureAddress(CkMime_IsAudio, 'CkMime_IsAudio');
  Chilkat_GetProcedureAddress(CkMime_IsEncrypted, 'CkMime_IsEncrypted');
  Chilkat_GetProcedureAddress(CkMime_IsHtml, 'CkMime_IsHtml');
  Chilkat_GetProcedureAddress(CkMime_IsImage, 'CkMime_IsImage');
  Chilkat_GetProcedureAddress(CkMime_IsMultipart, 'CkMime_IsMultipart');
  Chilkat_GetProcedureAddress(CkMime_IsMultipartAlternative, 'CkMime_IsMultipartAlternative');
  Chilkat_GetProcedureAddress(CkMime_IsMultipartMixed, 'CkMime_IsMultipartMixed');
  Chilkat_GetProcedureAddress(CkMime_IsMultipartRelated, 'CkMime_IsMultipartRelated');
  Chilkat_GetProcedureAddress(CkMime_IsPlainText, 'CkMime_IsPlainText');
  Chilkat_GetProcedureAddress(CkMime_IsSigned, 'CkMime_IsSigned');
  Chilkat_GetProcedureAddress(CkMime_IsText, 'CkMime_IsText');
  Chilkat_GetProcedureAddress(CkMime_IsVideo, 'CkMime_IsVideo');
  Chilkat_GetProcedureAddress(CkMime_IsXml, 'CkMime_IsXml');
  Chilkat_GetProcedureAddress(CkMime_LoadMime, 'CkMime_LoadMime');
  Chilkat_GetProcedureAddress(CkMime_LoadMimeFile, 'CkMime_LoadMimeFile');
  Chilkat_GetProcedureAddress(CkMime_LoadXml, 'CkMime_LoadXml');
  Chilkat_GetProcedureAddress(CkMime_LoadXmlFile, 'CkMime_LoadXmlFile');
  Chilkat_GetProcedureAddress(CkMime_NewMessageRfc822, 'CkMime_NewMessageRfc822');
  Chilkat_GetProcedureAddress(CkMime_NewMultipartAlternative, 'CkMime_NewMultipartAlternative');
  Chilkat_GetProcedureAddress(CkMime_NewMultipartMixed, 'CkMime_NewMultipartMixed');
  Chilkat_GetProcedureAddress(CkMime_NewMultipartRelated, 'CkMime_NewMultipartRelated');
  Chilkat_GetProcedureAddress(CkMime_RemoveHeaderField, 'CkMime_RemoveHeaderField');
  Chilkat_GetProcedureAddress(CkMime_RemovePart, 'CkMime_RemovePart');
  Chilkat_GetProcedureAddress(CkMime_SaveBody, 'CkMime_SaveBody');
  Chilkat_GetProcedureAddress(CkMime_SaveMime, 'CkMime_SaveMime');
  Chilkat_GetProcedureAddress(CkMime_SaveXml, 'CkMime_SaveXml');
  Chilkat_GetProcedureAddress(CkMime_SetBody, 'CkMime_SetBody');
  Chilkat_GetProcedureAddress(CkMime_SetBodyFromEncoded, 'CkMime_SetBodyFromEncoded');
  Chilkat_GetProcedureAddress(CkMime_SetBodyFromFile, 'CkMime_SetBodyFromFile');
  Chilkat_GetProcedureAddress(CkMime_SetBodyFromHtml, 'CkMime_SetBodyFromHtml');
  Chilkat_GetProcedureAddress(CkMime_SetBodyFromPlainText, 'CkMime_SetBodyFromPlainText');
  Chilkat_GetProcedureAddress(CkMime_SetBodyFromXml, 'CkMime_SetBodyFromXml');
  Chilkat_GetProcedureAddress(CkMime_SetHeaderField, 'CkMime_SetHeaderField');
  Chilkat_GetProcedureAddress(CkMime_SetVerifyCert, 'CkMime_SetVerifyCert');
  Chilkat_GetProcedureAddress(CkMime_UnwrapSecurity, 'CkMime_UnwrapSecurity');
  Chilkat_GetProcedureAddress(CkMime_UrlEncodeBody, 'CkMime_UrlEncodeBody');
  Chilkat_GetProcedureAddress(CkMime_UseCertVault, 'CkMime_UseCertVault');
  Chilkat_GetProcedureAddress(CkMime_Verify, 'CkMime_Verify');
  Chilkat_GetProcedureAddress(CkMime_GetStructure, 'CkMime_GetStructure');
  Chilkat_GetProcedureAddress(CkMime_GetMimeSb, 'CkMime_GetMimeSb');
  Chilkat_GetProcedureAddress(CkMime_GetMimeBd, 'CkMime_GetMimeBd');
  Chilkat_GetProcedureAddress(CkMime_LoadMimeSb, 'CkMime_LoadMimeSb');
  Chilkat_GetProcedureAddress(CkMime_LoadMimeBd, 'CkMime_LoadMimeBd');
  Chilkat_GetProcedureAddress(CkMime_GetBodyBd, 'CkMime_GetBodyBd');
  Chilkat_GetProcedureAddress(CkMime_GetLastJsonData, 'CkMime_GetLastJsonData');
  Chilkat_GetProcedureAddress(CkMime_LastDecryptCert, 'CkMime_LastDecryptCert');
  Chilkat_GetProcedureAddress(CkMime_LastSignerCert, 'CkMime_LastSignerCert');
  Chilkat_GetProcedureAddress(CkMime_PartAt, 'CkMime_PartAt');
  Chilkat_GetProcedureAddress(CkMime_PartsToFiles, 'CkMime_PartsToFiles');
  Chilkat_GetProcedureAddress(CkMime_AddPfxSourceBd, 'CkMime_AddPfxSourceBd');
  Chilkat_GetProcedureAddress(CkMime_SetBodyBd, 'CkMime_SetBodyBd');
  Chilkat_GetProcedureAddress(CkMime_GetDecryptCertInfo, 'CkMime_GetDecryptCertInfo');

end.
